Update API Key
Switch an API key on or off, or archive it.
Change the status of an API key: switch it on or off, or archive it. The response is the updated API key. API key names are fixed once created and can't be changed.
POST /v1/account/api_keys/:api_key_idStatus changes take effect within seconds: a key set to inactive or
archived stops working on its next request.
Archiving is permanent
An archived API key can never be updated again, and it
disappears from the console. Use inactive if you may need the API key back.
Path parameters
api_key_idstringrequiredThe key's ID, starting with key_.
Body
statusstringoptionalNew status. expired can't be
set; it follows the key's expires_at.
Allowed values:
activeinactivearchivedAny other field is rejected with 400.
Response
(object)ApiKeyoptionalThe updated API key object.
Errors
| Status | Reason |
|---|---|
400 | A field is invalid or unknown, or the API key is archived (Archived API keys cannot be updated.). |
404 | No key with this ID exists on your account. |