Skip to main content

API key

Create API keys in the Backoffice under Settings > Integration (Production, Sandbox). A key works only in the environment it was created in. You can give a key an expiration date when you create it. Send the key in the Authorization header with the Bearer scheme:
Call the API only from your server. Never put an API key in a web page, a mobile app or a public repository. The Web SDK uses a separate public key that is safe to expose.

Environments

Both environments have the same paths. Only the base URL and the key differ.

Key rotation

Several API keys can be active at once, so you can rotate without downtime:
  1. Create a new key in the Backoffice.
  2. Switch your integration to the new key.
  3. Confirm that requests with the new key succeed.
  4. Deactivate or delete the old key.

Migrating from legacy keys

Legacy keys are sent in the X-AUTH-KEY header and still work. To migrate, follow the rotation steps above, and in step 2 switch to the Authorization: Bearer header as well. If a request has both headers, the Bearer key is used. Only one legacy key could be issued per environment, so several of your systems may share it. Switch all of them before you deactivate it. Legacy keys also signed webhooks. API keys and the webhook secret are now separate: migrating the API key does not change webhook signing. See Rotate the secret.

Error responses

A request without a valid key returns 401 Unauthorized. The code tells you why: