Fuel Switch API

Fuel Switch exposes a REST API that allow users with renewable energy projects to upload energy data in an automated manner.

For more information about data format and validation, see Data format & validation

Swagger

All timestamps should use the ISO8601 format.

Example of a valid timestamp: 2023-09-30T22:00:00.000Z

The Fuel Switch API allows third-party services to interact directly with the Fuel Switch backend (instead of going through our web application). The features available are listed below.

Sandbox Environment

We offer a complete sandbox environment that developers can use to build and test integrations with our system, without affecting anything on production. To use the sandbox, you will need an approved account on the Fuel Switch sandbox environment. Sign up, verify your email, and fill out the KYC information. If the KYC approval takes longer than expected, reach out to the Fuel Switch administrator via support@fuelswitch.io to approve your account.

The Fuel Switch production and sandbox web applications can be accessed here:

Base URL

The following endpoints are available for Fuel Switch:

Generating an API Key

To interact with the API, you first need to generate an API key. Follow these steps to create a new API key:

  • Log in to Your Account Visit the website and log into your account using your credentials.

  • Navigate to Account Settings After logging in, click on your account icon in the top-right corner of the page. In the dropdown menu, select Account Settings.

  • Go to API Keys Section Inside Account Settings, locate and click on the API Keys tab. This is where you can manage your existing keys or generate new ones.

  • Generate a New API Key Click on the Generate New Key button. You will be prompted to provide a name for your API key to help identify it in the future.

  • Copy and Store the Key After generating the key, make sure to copy it and store it securely. You will not be able to view the key again after this point.

Authentication

  • Type: API Key

  • Key Name: fuelswitch-api-key

  • Description: Our API uses an API key-based authentication mechanism. Each request to the API must include a valid API key in the request headers. You can generate an API key via the web UI by navigating to the Account Settings → API Keys section and creating a new key (see above section). Once generated, you can copy the fuelswitch-api-key and use it in your requests.

  • How to Use:

    • The API key should be added to the request header of each API call as follows:

      fuelswitch-api-key: YOUR_API_KEY
  • Example: In a cURL request, the API key would be included like this:

    curl -X GET "https://app-testnet.fuelswitch.io/api/v1" \
    -H "fuelswitch-api-key: YOUR_API_KEY"
  • Important Notes:

    • Ensure the API key is kept confidential and secure.

    • The API key is unique to your account and should be regenerated if compromised.

    • If the API key is missing or invalid, the API will return an authentication error with a message of "UNAUTHORIZED"

Last updated