Authentication
The Envoy AI API supports two authentication methods. Choose the one that fits your use case.
Bearer token
Bearer tokens are short-lived JWTs for interactive sessions. Use them when building user-facing applications or testing from the dashboard.
Obtain a token by calling the login endpoint:
The response includes an access_token:
Include it in subsequent requests using the Authorization header:
API key
API keys are long-lived credentials for programmatic access. Use them for TMS integrations, automated pipelines, and server-to-server communication. Each key is scoped to your organization.
Create an API key through the dashboard or via the API:
The key value is returned once in the response. Store it securely — it cannot be retrieved again.
Include it in requests using the X-API-Key header:
When to use each method
Security best practices
- Rotate API keys regularly. Use the regenerate endpoint to issue a new key without downtime.
- Never expose keys in client-side code. API keys belong on your server, not in browser JavaScript or mobile apps.
- Set expiration dates on keys used for time-limited integrations.
- Use separate keys for separate integrations. This limits blast radius if a key is compromised.
- Deactivate unused keys immediately via
DELETE /api-keys/{id}.

