Update an API key
PATCH/api-keys/:api_key_id
Changes the name, description, active status or expiration time of an API key. Fields that the request omits keep their values, and null removes the description or the expiration time. Deactivation with "active": false takes effect on the next request that uses the key. The master key cannot be deactivated or given an expiration, and only the master key can change its own name and description.
Permissions. Write on the API key.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
The API key was updated. The body is the updated key, without the secret.
The body is not valid JSON.
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The request deactivates the master key, gives the master key an expiration, or changes the master key with another key (Unauthorized: write access to API Key required, with The master API key cannot be deactivated, given an expiration or changed by another key through the API in details.error). The same status reports a license that does not permit changes (Invalid license: ...).
No API key with this identifier exists, or the calling key lacks write permission on the API key (API Key not found, with the identifier in details.id).
Another API key has the same name (Conflict unique error).
The body does not match the request schema, for example a value of the wrong type or an unknown field.