Create an agent
Create a new agent with a specified policy. Returns the created agent and a device code that must be redeemed by the agent software to complete installation.
Agents of a BUSINESS customer are available only where the platform enables them, and require actingFor to name the person the agent acts for. Until the business’s KYB status is APPROVED, its agents’ sends and deposits are held to the same limits as an unverified individual’s, counted across the whole business.
Send an Idempotency-Key header to make retries safe: a request carrying a key already used returns the agent the first request created, with a 200 instead of a 201 and a new device code that replaces any unredeemed one. The request is compared with the agent as it is now, so reusing a key with a different customer, name, policy, actingFor or spendingPoolId, after the agent’s policy or pool was changed, for an agent that was deleted, or for one already connected is rejected with 409. Without a key a retry cannot be recognised, so each request creates its own agent.
Authorizations
API token authentication using format <api token id>:<api client secret>
Headers
A unique identifier for the request. A retry with the same key returns the agent the first request created rather than creating a second one.
255"550e8400-e29b-41d4-a716-446655440000"
Body
Human-readable name to identify the agent.
"Payroll Automation Agent"
The ID of the customer this agent will operate on behalf of.
"Customer:019542f5-b3e7-1d02-0000-000000000001"
Policy governing what an agent can do, how it executes actions, and its spending boundaries.
The platform's own reference for the person this agent acts for, such as a member id within a business. Grid stores it as given, never interprets it, and copies it onto every card the agent is issued, for audit and screening. Required when the customer is a BUSINESS, where agents are available only where the platform enables them for business customers; optional for an INDIVIDUAL. It cannot be changed after the agent is created.
1 - 255"member_8f2c1a"
A spending pool of the same customer to put the agent in, where the platform enables spending pools. The agent's policy must be in the pool's currency.
"SpendingPool:019542f5-b3e7-1d02-0000-000000000007"
Response
The Idempotency-Key was already used for this request: the agent the first request created, with a new device code