Update API Key
Update a v5 API key's name, expires_at, or status. Permissions are immutable. status: revoked revokes (recoverable); status: active reinstates a revoked key. A deleted key cannot be modified.
Path Parameters
- Type: string · Key Idkey
_id required
Headers
- enumAcceptconst:application/jsonrequired
Response format. Must be
application/json.values- application/json
- enumContent
- Type const:application/jsonrequiredRequest payload format. Must be
application/jsonwhen a body is sent.values- application/json
Body·
required
application/json
Update body for a v5 API key. Only name, expires_at, and a status transition are accepted — permissions are immutable after creation. status: "revoked" revokes (recoverable); status: "active" reinstates a revoked key. A deleted key cannot be modified or reinstated.
- Type: string · Expires AtFormat: date-timenullableexpires
_at the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- Type: string · Namenullablename
- Type: string · Statusenumnullablestatusvalues
- active
- revoked
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for put/v5/apikeys/{key_id}
curl '/v5/apikeys/{key_id}' \
--request PUT \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "",
"expires_at": "",
"status": "active"
}'
{
"id": "string",
"account_id": "string",
"name": "string",
"key": "string",
"key_last4": "string",
"permissions": [
"payments:tap-ios"
],
"status": "active",
"expires_at": "2026-07-10T18:41:46.914Z",
"created_at": "2026-07-10T18:41:46.914Z",
"last_used_at": "2026-07-10T18:41:46.914Z",
"is_legacy": true
}
