Authentication

To access the Manifold API, you need to authenticate using an API token. This token identifies your account and allows you to interact with various endpoints, giving you access to vehicle data, driver information, and more.

Getting Your API Token

To generate your API token:

  1. Log in to the Manifold portal
  2. Click on Settings in the bottom-left corner
  3. Make sure the API Tokens tab is selected
  4. Enter a Token Name (e.g., "Dev Testing") on the right side of your screen.
  5. Click Generate Token
  6. Important: Copy your token immediately and store it securely. You won't be able to view it again.

Note: API tokens have full account access. Never share them publicly or commit them to code repositories.

Using the API Key

Manifold uses an API key-based authentication scheme. To authenticate, include your token in the x-api-key header of your HTTP request. Additionally, a Connection-Id is required to specify the data source for most endpoints..


Example of a Request with Authentication

curl --request GET 'https://api.analytics.autos/connections' \
--header 'x-api-key: YOUR_API_KEY'

This header is required for all API requests. Without it, you’ll receive a 401 Unauthorized error.


Refreshing the API Key

API keys cannot be refreshed. When a key expires, you need to generate a new one through the Manifold portal by following the steps above.


⚠️ Security Best Practices

  • Keep Your Key Private: Do not share your API key or include it in client-side code. Anyone with access to this key has access to your data.
  • Rotate Keys Periodically: Regularly rotate your API keys and monitor their usage to improve security.
  • Use Different Keys for Different Environments: For example, generate separate keys for development and production environments to prevent unintended access.

Handling Unauthorized Requests

If your API key is invalid or expired, the API will return a 401 Unauthorized error. Here’s a quick checklist for troubleshooting:

  1. Verify the Key: Ensure you’re using a valid API key in the x-api-key header.
  2. Check Expiry: If your key has expired, generate a new one through the Manifold portal.
  3. Confirm Header Syntax: Ensure you’re using the x-api-key header with the correct key value.

By following these steps, you’ll have seamless and secure access to Manifold’s API, enabling you to make the most out of your fleet data and integrations.