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
  • key_id
    Type: string · Key Id
    required
Headers
  • Accept
    enum
    const:  
    application/json
    required

    Response format. Must be application/json.

    values
    • application/json
  • Content-Type
    enum
    const:  
    application/json
    required

    Request payload format. Must be application/json when 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.

  • expires_at
    Type: string · Expires AtFormat: date-timenullable

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • name
    Type: string · Namenullable
  • status
    Type: string · Statusenumnullable
    values
    • 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
}