Skip to main content
The Alta API uses Bearer token authentication. Every request must include a valid API token in the Authorization header.

Generating a token

Generate an API token from the Alta dashboard under User Profile > API tokens.

Making authenticated requests

Include the token in the Authorization header:
curl https://api.altahq.com/v1/campaigns \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Multi-account users

If your user has access to multiple accounts, you must include the x-account-id header to specify which account to use:
curl https://api.altahq.com/v1/campaigns \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "x-account-id: YOUR_ACCOUNT_ID"
If you have access to only one account, this header is optional - the API uses your account automatically.

Error responses

If authentication fails, the API returns a 401 Unauthorized response:
{
  "error": "Unauthorized",
  "message": "Invalid API token"
}
Common causes:
  • Missing Authorization header
  • Invalid or expired token
  • Using a non-Bearer authorization type
  • Missing x-account-id header for multi-account users