FlaresendDocs
Admin API

Rename an API key

Change a key's label. The key itself does not change.

PATCH/v1/admin/api-keys/{id}Admin key

Only 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

idstringpathrequired

The key ID, for example key_01K6B1T8W2N5R7X9Q3M6V4ZP8H.

Body parameters

namestringrequired

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

StatusCodeWhen
400invalid_bodyname is missing, empty or longer than 200 characters.
404api_key_not_foundNo key has this ID.