Update an API key
Updates an API key’s name, description, scope, or role. The key value cannot be changed.
Idempotent — pass an Idempotency-Key header to make safely retryable. On a replay the original response is returned with Idempotent-Replayed: true. See the API conventions guide for the full state machine, TTL, and mismatch behaviour.
Authorizations
Project-scoped secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.
Path Parameters
Numeric API key identifier.
12
Body
Update an API key’s metadata. The key value cannot be changed.
1public (pk_) keys are safe to embed in browser/SDK code on an explicit allowlist of endpoints. secret (sk_) keys grant full project-scoped access and must be kept server-side.
public, secret The caller’s role on this project.
support, smtpproxy, editor, publisher, admin Response
The updated API key.
A project-scoped API key. Scope (public/secret) controls what endpoints it can call; role gates write access.
Numeric API key identifier.
12
Human-readable label for the API key.
"Production server"
public (pk_) keys are safe to embed in browser/SDK code on an explicit allowlist of endpoints. secret (sk_) keys grant full project-scoped access and must be kept server-side.
public, secret The caller’s role on this project.
support, smtpproxy, editor, publisher, admin The key value, prefixed with sk_ (secret) or pk_ (public). Returned in full only on creation; subsequent reads return a masked form.
"sk_01HXY7Z9K8M5J2N4P6Q8R0S1T2"
Optional description.
When true, the key is system-managed and cannot be archived from the API.