Skip to main content
An agent key (agk_*) is a credential bound to one agent. Its secret starts with ak_ntl_, and a request made with it acts as that agent. To learn more, see Create an agent and Authentication.

Example

GET /agent-keys
The object is each element of data; this shows the first one. The field names below are relative to it: attributes.agentKeyPrefix is data[].attributes.agentKeyPrefix in the response.

Fields

string
required
Resource type. Always agentKey.
string
required
Agent key ID (agk_*).
object
required
The agent key’s details.
object
required
Related resources, each by type and ID.

Statuses

Events

This resource sends no webhook events.

Endpoint differences

These endpoints return the object with a difference:
  • POST /agent-keys also returns the plaintext agentKey, the only time it is shown.
  • POST /agent-keys/{keyId}/rotate also returns the new plaintext agentKey, shown only this once, and previousKeyExpiresAt, when the old key stops working.

Errors

See the error codes these endpoints return.

Sandbox simulations

None.