Admin API
Rename an API key
Change a key's label. The key itself does not change.
PATCH
/v1/admin/api-keys/{id}Admin keyOnly the name can change. Mode, expiry and the key value are fixed; to change those, create a new key and revoke the old one.
Path parameters
The key ID, for example key_01K6B1T8W2N5R7X9Q3M6V4ZP8H.
Body parameters
The new label, 1 to 200 characters.
Response
Status 200 with the key record (no full key), as described in Create an API key.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_body | name is missing, empty or longer than 200 characters. |
| 404 | api_key_not_found | No key has this ID. |