post
https://api.everee.com/integration/v1/partner/companies//api-keys//rotate
Replace an API key without a gap.
Use this endpoint to replace a company API key. It issues a new key with the same label and settings, shown in the response once, and schedules the old key to stop working after expireInHours hours, from 0 to 24. In that window both keys work, so you can move the integration over without an outage. With 0, the old key stops now.
Once the old key has expired, requests that use it get a 401. See Authentication & API tokens.
A key that already has an expiry scheduled can't be rotated: cancel the expiry first, or wait for it.
Errors
| Status | Meaning |
|---|---|
400 | The key already has an expiry scheduled, or has already expired. |
401 | The API key is missing, malformed or expired. |
404 | No company with this ID belongs to your partner account, or the company has no key with this ID. |
412 | Custom API integrations aren't enabled for this company. |
422 | expireInHours is missing, or isn't from 0 to 24. |
Part of Company API keys. Authenticate with your partner API key, as for every endpoint in this section: see Authentication.