Issue an agent card
Changed onIssue a virtual card for the authenticated agent. The card belongs to the agent's customer, who must have KYC status APPROVED and have accepted the cardholder agreement where the platform requires one. Its spend counts against the agent's policy limits as the agent's sends do, and Grid's default agent merchant-category blocks apply. Requires the ISSUE_CARDS permission; reading the card afterwards needs MANAGE_CARDS.
Standard card (kind omitted or STANDARD): as POST /cards with agentId does for the platform. While any of the agent's standard cards is not CLOSED, including one the platform issued for it, the request is rejected with AGENT_CARD_EXISTS. New cards start in status: "PROCESSING" and follow the same status transitions and card.status_change webhooks as cards issued with POST /cards.
Purchase card (kind: PURCHASE): a single-use card for one online purchase of amount, paid from the customer's Embedded Wallet with the agent's delegated key. Available only where the platform enables agent purchase cards. Its limit (purchase.spendLimit) is amount plus an allowance for tax and shipping, and that limit is evaluated against the agent's policy as a send of the same amount would be:
-
Under the policy's approval threshold, and with defaultExecutionMode AUTO, the card is issued at once and returned with 201.
-
Otherwise the request becomes an ISSUE_PURCHASE_CARD agent action in PENDING_APPROVAL, returned with 202, and the AGENT_ACTION.PENDING_APPROVAL webhook fires. The card is issued when the action is approved with POST /agents/{agentId}/actions/{actionId}/approve; the action then carries cardId. Poll GET /agents/me/actions/{actionId} for the outcome.
-
A request the policy denies outright (over a spending limit, or a funding account the policy does not allow) is rejected with 403.
The card is closed by its first approved authorization, and Grid closes it if it is still unused at purchase.expiresAt. Purchase cards are not counted by the one-standard-card rule, but an agent may hold only a limited number of open purchase cards, counting those awaiting approval; beyond that the request is rejected with PURCHASE_CARD_LIMIT_REACHED.
Recurring purchase card (kind: PURCHASE, recurring: true): for a subscription, a card saved with a merchant, a hotel or car rental, or an order that ships in parts. Available only where the platform enables recurring purchase cards. The card locks to the first merchant that charges it and declines every other merchant; that merchant may charge it again, up to amount in any trailing month (from a charge back to the same date a month earlier), with no allowance added. It always becomes an ISSUE_PURCHASE_CARD action awaiting the customer's approval and is returned with 202, whatever the policy's approval threshold or execution mode, though a request the policy denies is still rejected with 403. Its charges count against the agent's policy limits as they are authorized. It has no purchase.expiresAt and stays open until the customer or platform closes it (PATCH /cards/{id} with status: CLOSED, a substatus and a reason). Pausing the agent does not close it, but its charges are declined while the agent is paused; deleting the agent freezes it, and POST /agents/{agentId}/card-handover with kind=PURCHASE can move it to the customer's next agent. Recurring cards have their own, smaller limit on open cards, counting those awaiting approval, and do not use up the room for single-use cards. Card details are never returned here; request them with POST /agents/me/cards/{cardId}/reveal.
Card issuance cannot be reversed, so an Idempotency-Key header is required. Keys are scoped to the agent: a retry by the same agent with the same key returns what the first request created, whatever has changed since, and another agent's key never matches. For a purchase card, a retry returns the issued card with 201, or the action with 202 while it is pending, rejected or failed.
Request
- Base URLhttps://api.lightspark.com/grid/2025-10-13
- URLhttps://api.lightspark.com/grid/2025-10-13/agents/me/cards
- AuthHTTP bearer
Headers
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.
Request body
Example request
{
"fundingSource": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
"amount": 4999,
"description": "Running shoes from example-store.com"
}Response
Card created. A standard card starts in PROCESSING while the issuer provisions it. A purchase card is returned with purchase set.
Example response
{
"card": {
"id": "Card:019542f5-b3e7-1d02-0000-000000000010",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"platformCardId": "card-emp-001",
"pinStatus": "OK",
"pinUnblockAvailableAt": "2026-10-15T15:00:00Z",
"last4": "4242",
"expMonth": 12,
"expYear": 2029,
"fundingSource": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
"cardCapabilities": {
"supportsVelocityLimits": true,
"supportsPanReveal": true,
"supportsDigitalWalletTokenization": true
},
"maxNetworkRiskScore": 700,
"allowedMccs": [
"5411"
],
"blockedMccs": [
"7995"
],
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"currency": "USD",
"processorRef": "card_b81c2a4f",
"issuerRef": "lead_card_7a1b9c3d",
"createdAt": "2026-05-08T14:10:00Z",
"updatedAt": "2026-05-08T14:11:00Z"
},
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"effectiveBlockedMccs": [
"7995",
"6051"
],
"purchase": {
"amount": 4999,
"spendLimit": 5749,
"currency": "USD",
"description": "Running shoes from example-store.com",
"fundingSource": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
"expiresAt": "2026-10-26T15:30:00Z"
}
}Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- info
added the new optional request property
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info