Skip to main content
PUT
/
api-keys
/
{key_id}
/
revoke
Revoke API key
curl --request PUT \
  --url https://api.natural.co/api-keys/{key_id}/revoke \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "type": "api_key",
    "id": "key_019cd360-4fd6-7bf5-a3b5-821ca7836c14",
    "attributes": {
      "api_key_prefix": "nat_live_abc123__",
      "name": "production-key",
      "scopes": [
        "payments.read",
        "payments.create"
      ],
      "environment": "production",
      "status": "ACTIVE",
      "created_at": "2026-01-04T15:30:00Z",
      "expires_at": "2026-04-04T15:30:00Z",
      "last_used_at": null,
      "revoked_at": null,
      "created_by": null,
      "revoked_by": null
    },
    "relationships": {
      "party": {
        "data": {
          "type": "party",
          "id": "pty_019cd1798d617f65a79cb965dda9eac3"
        }
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Agent-ID
string | null

Agent ID (agt_xxx) identifying which agent is making the request.

X-Instance-ID
string | null

Agent session/conversation ID for observability.

Maximum string length: 1024

Path Parameters

key_id
string
required

Response

Successful Response

Single API key response.

data
ApiKeyResource · object
required

Resource object