All API requests require authentication via a Bearer token in the Authorization header.
API keys
API keys are prefixed with leo_ and can be created in Settings > API in your Leonar dashboard.
Keep your API keys secure. Never expose them in client-side code, public repositories, or URLs.
Scopes
Each API key has granular permissions controlled by scopes. When creating a key, select only the scopes your integration needs.
Scope bundles
For convenience, you can use scope bundles when creating API keys:
Error responses
If authentication fails, the API returns a 401 error:
If the API key lacks the required scope, a 403 is returned: