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 theAuthorization header with the Bearer scheme:
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:- Create a new key in the Backoffice.
- Switch your integration to the new key.
- Confirm that requests with the new key succeed.
- Deactivate or delete the old key.
Migrating from legacy keys
Legacy keys are sent in theX-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 returns401 Unauthorized. The code tells you why:
