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.
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.
Hide attributes
string
required
Non-secret prefix of the agent key, e.g. ak_ntl_prod_abc123.
string
required
Agent key status. One of: ACTIVE, REVOKED. See Statuses.
string
required
RFC 3339 timestamp when this key was created.
string | null
required
RFC 3339 timestamp when this key was last used, or null when never used.
string | null
required
RFC 3339 timestamp when this key was revoked, or null while active.
string | null
required
User who created this key (usr_*).
string | null
required
User who revoked this key (usr_*).
string | null
required
RFC 3339 timestamp when this key stops authenticating, or null when it has no scheduled expiration.
object
required
Metadata visible to anyone who can read the resource.
object
required
Related resources, each by type and ID.
Hide relationships
object
required
Party that owns the agent key.
Hide party
object
required
Related resource identifier.
Hide data
string
required
Resource type. Always party.
string
required
ID of the party that owns the agent key (pty_*).
object
required
Agent this key is bound to.
Hide agent
object
required
Related resource identifier.
Hide data
string
required
Resource type. Always agent.
string
required
ID of the agent this key is bound to (agt_*).
Statuses
Status
Meaning
Can become
ACTIVE
The key can authenticate. Every new key starts here. When expiresAt is set, after a rotation with a grace period, the key stops working at that time. A key of a deleted agent stays ACTIVE but can’t authenticate.
REVOKED
REVOKED
You revoked the key, rotated it with no grace period, or the account was closed. It can’t authenticate again.
Final
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.