Skip to main content
DELETE
/
agent-keys
/
{keyId}
Revoke agent key
curl --request DELETE \
  --url https://api.natural.co/agent-keys/{keyId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Idempotency-Key: <idempotency-key>'
{
  "data": {
    "type": "agentKey",
    "id": "agk_550e8400e29b41d4a716446655440000",
    "attributes": {
      "agentKeyPrefix": "ak_ntl_prod_sxHp_FRoRTnDEmEH",
      "status": "REVOKED",
      "createdAt": "2026-01-04T15:30:00Z",
      "lastUsedAt": null,
      "revokedAt": "2026-01-06T10:00:00Z",
      "createdBy": "usr_550e8400e29b41d4a716446655440000",
      "revokedBy": "usr_550e8400e29b41d4a716446655440000"
    },
    "relationships": {
      "party": {
        "data": {
          "type": "party",
          "id": "pty_7c9e6679e29b41d4a716446655440001"
        }
      },
      "agent": {
        "data": {
          "type": "agent",
          "id": "agt_019cd1798d637a4da75dce386343931d"
        }
      }
    }
  },
  "meta": {
    "deleted": true
  }
}

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string
required

Unique key for idempotent request handling. If a request with the same key was already processed, the original response is returned.

X-Agent-ID
string | null

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

X-Instance-ID
string | null

Required when X-Agent-ID is present. Session or conversation ID for agent observability.

Maximum string length: 1024

Path Parameters

keyId
string
required

Agent key ID (agk_*)

Pattern: ^agk_[0-9a-f]{32}$

Response

Successful Response

data
AgentKeyResource · object
required
meta
DeletedMeta · object
required