API authentication

Create an API key

  1. Head over to Settings / API keys.
  2. Give the key a name.
  3. Click Create API key.

You’ll see the token on the key’s page. Treat it like a password: it grants full access to your workspace’s content through the API.

Authenticate requests

Send the token as a Bearer authorization header on every request:

curl https://app.spinalcms.com/api/collections \
  -H "Authorization: Bearer YOUR_API_KEY"

Rotate a key

Rotating generates a new token and invalidates the old one immediately. Any client using the old token will stop working. You can rotate a key from its page.

Revoke a key

Deleting a key revokes access immediately. The key is removed from your workspace and can’t be used anymore.

Authentication errors

The API responds with a consistent error shape:

{
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  }
}
Status Code Meaning
401 unauthorized Missing or invalid token. Also returned for expired keys.
402 api_not_enabled The API is not enabled on your plan.
403 suspended The workspace is suspended.
429 rate_limited You’ve exceeded the hourly rate limit.
Have questions?

Something still unclear? Reach out to support. No bots or agents, but real humans.