Skip to main content
PATCH
Update an API key

Authorizations

Authorization
string
header
required

API key: Authorization: Bearer sk_test_... or sk_live_....

Headers

Invoice-Version
string

Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 request.invalid_version. Echoed back on every response.

Example:

"2026-07-10"

Invoice-Account
string

Connect: act on behalf of one of your connected accounts (its acct_…/org_… id). Omit to act as your own organization. Not honored on /v1/api_keys.

Example:

"org_2P9connectedacct"

Path Parameters

id
string
required

API-key id, e.g. "ak_2P9K3sample".

Body

application/json
name
string

New human label for the key.

Required string length: 1 - 100
version
string

Pin the key to a supported dated API version, e.g. "2026-07-10"; validated against the version registry.

Minimum string length: 1

Response

Default Response

object
enum<string>
required

Always "api_key".

Available options:
api_key
id
string
required

API-key id, e.g. "ak_2P9K3sample".

name
string | null
required

Human label, or null if unset.

mode
enum<string>
required

Environment this key stamps against: "test" or "live".

Available options:
test,
live
prefix
string
required

Non-secret key prefix used to identify the key, e.g. "sk_live_ab12".

last_used_at
string | null
required

When the key was last used (ISO-8601 UTC), or null.

revoked_at
string | null
required

When the key was revoked (ISO-8601 UTC), or null if active.

version
string | null
required

Pinned dated API version, or null to follow the current version.

created_at
string
required

Creation timestamp, ISO-8601 UTC.