Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer token authentication for agent-scoped endpoints. The token is the accessToken returned when redeeming a device code via POST /agents/device-codes/redeem. Agent credentials are user-scoped: all requests are automatically bound to the agent's associated customer and subject to the agent's policy.

Headers

Idempotency-Key
string
required

A unique identifier for the request, up to 255 characters, scoped to the agent. A retry carrying the same key returns the card created by the first request; reusing a key for a different card request is rejected with 409.

Maximum string length: 255
Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json

Request body for POST /agents/me/cards. Without kind, or with kind: STANDARD, it issues the agent's standard card. With kind: PURCHASE it requests a single-use purchase card for one online purchase of amount, or with recurring: true a recurring purchase card that may spend up to amount a month at one merchant.

fundingSource
string
required

Internal account id that funds the card. The account must belong to the agent's customer and be denominated in a card-eligible currency; otherwise the request is rejected with INVALID_INPUT. A PURCHASE card must be funded from an Embedded Wallet on which the agent holds an active delegated key.

Example:

"InternalAccount:019542f5-b3e7-1d02-0000-000000000002"

kind
enum<string>

The kind of card to issue. Defaults to STANDARD.

Available options:
STANDARD,
PURCHASE
amount
integer<int64>

The purchase amount in the smallest unit of USD. Required for kind: PURCHASE and rejected otherwise. Grid adds an allowance for tax and shipping to set the card's limit; see AgentPurchaseCardDetails. For a recurring card it is the monthly limit itself, with no allowance added, so include tax and shipping in it. Each platform sets the largest amount an agent may ask for, separately for single-use and recurring cards; a larger one is rejected with INVALID_INPUT.

Required range: x >= 1
Example:

4999

description
string

What the card is for, such as the merchant and item, shown to the customer when they approve it. Allowed only with kind: PURCHASE.

Maximum string length: 255
Example:

"Running shoes from example-store.com"

recurring
boolean
default:false

Request a recurring purchase card: one that locks to the first merchant that charges it and may be charged there again, up to amount in any trailing month (from a charge back to the same date a month earlier), until it is closed. Use it for a subscription, a card saved with a merchant, a hotel or car rental, or an order that ships in parts. It always needs the customer's approval, whatever the agent's policy says, and is available only where the platform enables recurring purchase cards. true is allowed only with kind: PURCHASE; false is accepted with any kind.

Example:

false

cardholder
object

The person the card is for, named on the card as an authorized user of the business. Required for every card when the agent's customer is a BUSINESS, and rejected for an INDIVIDUAL. For a purchase card that awaits approval, Grid keeps it, encrypted, until the card is issued or the request ends.

Response

Card created. A standard card starts in PROCESSING while the issuer provisions it. A purchase card is returned with purchase set.

A card that belongs to the authenticated agent: the card itself and how the agent may use it.

card
object
required
agentId
string
required

The agent the card belongs to.

Example:

"Agent:019542f5-b3e7-1d02-0000-000000000042"

agentCardKind
enum<string>
required

How an agent card is used and funded.

Available options:
STANDARD,
PURCHASE
effectiveBlockedMccs
string[]
required

Every merchant category code the card declines: blockedMccs plus the categories Grid blocks for agent cards, unless the platform lifted those defaults (defaultMccBlocksLifted).

Pattern: ^[0-9]{4}$
Example:
actingFor
string

The platform's reference for the person the card was issued for: the issuing agent's actingFor when the card was issued. Absent when the agent had none.

Example:

"member_8f2c1a"

purchase
object

The purchase the card was issued for. Present for PURCHASE cards.