Skip to main content

Error Response Format

All Trackpilots API errors follow a consistent response structure:

Authentication & Authorization Errors

All Trackpilots API endpoints require a valid API key sent in the Authorization header. The following errors are returned when authentication fails.

AUTHORIZATION_HEADER_MISSING

The request was sent without an Authorization header.
Fix: Add the Authorization header to every request.

INVALID_API_KEY_SCHEMA

The Authorization header was present but did not use the Bearer scheme.
Fix: Ensure the header value is prefixed with Bearer (note the space).
Common mistakes: sending Token YOUR_API_KEY, API_KEY, or the key value directly without a scheme.

API_KEY_MISSING

The Authorization: Bearer header was present but the key value after it was empty.
Fix: Make sure your API key value is not empty or undefined at the time the request is made. Check environment variable loading if using .env files.

INVALID_API_KEY

The API key was provided but does not match any active key on record — either it was never valid, has been deleted, or has been deactivated.
Fix:
  1. Log in to the Trackpilots dashboard and go to Settings → Developer Tools → API Keys.
  2. Confirm the key you are using is listed and shows an Active status.
  3. If the key has been deleted or deactivated, generate a new one and update your integration.

PLAN_EXPIRED

This error is returned from every API endpoint when the organisation’s subscription has expired or is on a plan that does not include API access.
Why this happens
  • The organisation’s paid subscription has expired and has not been renewed.
  • The organisation is on the Free (Basic) plan, which does not include API access.
  • The subscription is in a payment failure or pending state.
  • The API key belongs to an account whose plan has since been downgraded or cancelled.
How to resolve Step 1 — Check your current plan Log in to the Trackpilots dashboard and navigate to Settings → Billing. Confirm the subscription status shows Active. Step 2 — Renew or upgrade If the plan has expired or is on the Free tier, upgrade to the Starter Pack or higher to re-enable API access. Step 3 — Verify your API key After the plan is active, go to Settings → Developer Tools → API Keys and confirm your key is still active. If needed, generate a fresh key and replace it in your integration. Step 4 — Retry the request Once the plan is active and the key is valid, all endpoints will resume responding normally. No other changes to your integration are required.
If your plan shows Active in the dashboard but you are still receiving PLAN_EXPIRED, contact support — there may be a sync issue between the billing system and the API gateway.

Handling errors in code

Check the error.code field to handle specific errors programmatically without relying on HTTP status codes alone.

Error Code Reference


Support

For persistent errors after following the steps above: