Agents

Create an agent

Create an agent bound to an ACTIVE customer and one funding account. The agent has no credential until you issue a key. Requires a console session or an unconstrained organization key.

post/v1/agents

Headers

X-API-Keystring

API key

Request body

namestring required
descriptionstring
customerIdstring required

Principal customer. Must be ACTIVE. Every transfer the agent makes uses this as onBehalfOf.

sourceAccountIdstring required

The only account the agent may debit. Must belong to customerId.

allowedDestinationAccountIdsstring[] nullable

Destination accounts the agent may pay. Omit or null for any approved destination of customerId; [] for none.

metadataobject

Free-form key/value pairs

Example request

{
  "name": "Procurement Agent",
  "description": "Buys supplies",
  "customerId": "cus_abc123",
  "sourceAccountId": "vba_agent_balance",
  "allowedDestinationAccountIds": [
    "eba_vendor456"
  ],
  "limits": {
    "currency": "USD",
    "perTransaction": "100000",
    "perDay": "500000",
    "perMonth": "1000000"
  }
}

Response

idstring required
namestring required
descriptionstring nullable required
customerIdstring required
sourceAccountIdstring required
allowedDestinationAccountIdsstring[] nullable required
status'ACTIVE' | 'PAUSED' | 'REVOKED' required
metadataobject required
createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "id": "agt_abc123",
  "name": "Procurement Agent",
  "description": "Buys supplies",
  "customerId": "cus_abc123",
  "sourceAccountId": "vba_agent_balance",
  "allowedDestinationAccountIds": [
    "eba_vendor456"
  ],
  "limits": {
    "currency": "USD",
    "perTransaction": "100000",
    "perDay": "500000",
    "perMonth": "1000000"
  }
}

Changes