API Reference
Keys
GET /keys/apiKey

GET /keys/apiKey

Rotate your subscription key. Returns a new primary key and keeps the previous one valid as a secondary for 24 hours.

⚠️

Calling this endpoint immediately rotates your key. Make sure your deployment is ready to pick up the new key before calling.

Request

GET https://api.adzen.ai/keys/apiKey

Example

curl https://api.adzen.ai/keys/apiKey \
  -H 'X-API-Key: YOUR_CURRENT_KEY'

Response

200 OK

{
  "apiKey": "prod-abcdef123456789",
  "secondaryKey": "prod-previous-key-value",
  "secondaryKeyExpiresAt": "2026-04-18T22:00:00Z"
}

Response fields

FieldTypeDescription
apiKeystringThe new primary key. Use this for all future requests.
secondaryKeystringThe previous primary key. Still valid for 24 hours.
secondaryKeyExpiresAtstringISO-8601 timestamp when the secondary key stops working.

Typical workflow

  1. Call GET /keys/apiKey
  2. Store the new apiKey in your secrets manager
  3. Deploy the new key to your application
  4. Old requests using secondaryKey continue to succeed until secondaryKeyExpiresAt
  5. After the expiry, only the new apiKey works

Error responses

StatusMeaning
401Current key invalid
502Key rotation infrastructure unavailable — try again later