Agents

Get an agent's API key metadata

Changed on

Describe an agent's API key without revealing it.

Returns the key record's id, status (active, or revoked once revoked), created_at, rotated_at and created_by. The plaintext key is never returned — it is shown once, by :generate-api-key. Metadata stays available after revocation; the body is null if the agent never had a key. Allowed for the agent's owner or an org:admin.

get/agents/{agent_id}/api-key

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /agents/{agent_id}/api-key
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL /authorize, token URL /oauth/token)

Path parameters

agent_idstring required

ID of the agent.

Example:agnt_6968b3984d1c238dbe7e2e29

Response

Successful Response

created_atstring date-time required

When the API key was first created (RFC 3339).

created_bystring nullable

ID of the actor that created the API key.

idstring required

Unique ID of the API key record.

rotated_atstring date-time nullable

When the API key was last rotated (RFC 3339); null if never rotated.

statusstring required

Key status: active, or revoked once revoked.

Example response

{
  "created_at": "2026-01-15T09:30:00Z",
  "created_by": "usr_6968b3987ee4c3ec0b4ee3b9",
  "id": "agc_6968b398c1d2e3f4a5b6c7d8",
  "rotated_at": "2026-01-20T14:00:00Z",
  "status": "active"
}

Changes