Skip to main content
Every request to the Sevalla API is authenticated with an API key, sent in the Authorization header as a bearer token. The key belongs to one company, and the request can only act on that company’s services, with the permissions set on the key.

Create an API key

In the Sevalla dashboard, under Tools, click API keys, then click Create API key. Choose a predefined role (Company viewer is enough to read) or custom capabilities, and copy the key: it’s shown only once. API keys in the platform docs covers roles, capabilities, expiration and rotation. You can also create keys with Create API key. Create one key per integration or environment, so you can rotate or revoke one without breaking the others.

Send the key

Keep the key in an environment variable and send it on every request:
Never put the key in code you commit, a URL or a browser app: anyone with the key can act on the company within its permissions.

Check a key

Two operations work with any valid key, whatever its permissions:

Permissions

Each operation checks the permissions it needs, written RESOURCE:ACTION: List applications needs APP:READ, Trigger deployment needs APP:UPDATE, and Clone application needs both APP:READ and APP:CREATE. A key has a predefined role or custom capabilities, and a capability can be limited to specific resources. Permissions in the platform docs lists the roles and capabilities. When a capability is limited to specific resources, requests for other resources of that type fail with 403, and list operations return only the resources the key can see.
A key with API_KEY:CREATE can create new keys with any role, including Company admin. Give that permission only to keys you’d trust with full access.

Authentication errors

A request that doesn’t match the operation’s schema, such as an ID that isn’t a UUID, returns 400 before the key is checked. See Errors for every status code.