Agents

Create an agent key

Issue a credential that authenticates as this agent. The secret is returned once. Agent keys carry fixed scopes (transfers read/write, accounts read, customers read) and cannot manage agents or keys.

post/v1/agents/{id}/keys

Path parameters

idstring required

Headers

X-API-Keystring

API key

Request body

namestring

Label for the key. Defaults to the agent name.

expiresAtstring date-time

Optional hard expiry

Example request

{
  "name": "procurement-runtime",
  "expiresAt": "2027-01-01T00:00:00Z"
}

Response

idstring required
agentIdstring required
namestring required
keyHintstring required

Last 4 characters of the secret

status'ACTIVE' | 'REVOKED' | 'EXPIRED' required
createdAtstring date-time required
expiresAtstring date-time nullable required
lastUsedAtstring date-time nullable required
secretstring

Full API key. Present only in the create response. Prefix sk_live_agent_ (production) or sk_sandbox_agent_ (sandbox).

Example response

{
  "id": "ak_abc123",
  "agentId": "agt_abc123",
  "name": "procurement-runtime",
  "keyHint": "9f3a",
  "secret": "sk_sandbox_agent_1a2b3c4d5e6f7g8h9f3a"
}

Changes

Changed in 1 of the 19 revisions of this API.1