Skip to main content
PATCH

Overview

Changes a key’s name and/or permissions in place. The key material is untouched, so agents that already hold the key keep working with the new rules on their next call. Use this to tighten an allow-list, add a spend cap, or turn on the confirmation requirement for destructive calls without re-pasting a new secret into every agent config. Permissions are replaced as a whole. To change one field, read the key first (GET /v1/api-keys) and send the full object back with the change. Auth: JWT (dashboard) or an API key belonging to the same account.

Path Parameters

string
required
The API key UUID to update

Body

Send at least one field.
string
New display name. Leading and trailing whitespace is trimmed; an empty name is rejected.
object
Replacement permissions. Send {} (or an object whose fields are all null) for full access.
string
Name of the agent this key belongs to
string
One of coding_agent, assistant, workflow, service, other
string
One line on what the key is for

Response

The updated key, in the same shape as GET /v1/api-keys. The secret is never returned here.
string
API key UUID
string
First 8 characters of the key
string
Key name
string
Creation timestamp
string
Last usage timestamp
object
Permissions as stored. null means unrestricted.

Errors

Every update is recorded in the audit log as key.update with the list of changed fields.

Example