---
title: "Hand a deleted agent's card to an agent"
method: POST
path: "/agents/{agentId}/card-handover"
tags: ["Agent Management"]
---

# Hand a deleted agent's card to an agent

`POST /agents/{agentId}/card-handover`

## Request

- Base URL: `https://api.lightspark.com/grid/2025-10-13`
- URL: `https://api.lightspark.com/grid/2025-10-13/agents/{agentId}/card-handover`
- Auth: HTTP basic

Move the customer's standard agent card that Grid froze when the agent it was issued for was deleted to this agent, and unfreeze it. Use this when a customer reconnects agent software whose agent the platform deleted: a frozen card still counts against the customer's card limit, so without a hand-over the customer can neither use it nor be issued another.

A card qualifies only while the freeze Grid placed on its agent's deletion is the only reason it is frozen. A card frozen by the platform, the customer, an agent or Lightspark is left as it is, and single-use purchase cards are never handed over.

With `kind=PURCHASE`, the newest qualifying recurring purchase card is handed over instead; call again until `204` to move each of them. It is available only where the platform enables recurring purchase cards. The agent must also hold an active delegated key on the Embedded Wallet that funds the card, which pays for the card from then on; a card on a wallet where it holds none is not handed over. The agent may hold a standard card, but must have room under the platform's limit on open recurring purchase cards, counting those awaiting approval; otherwise the request is rejected with `PURCHASE_CARD_LIMIT_REACHED`.

The agent must belong to the card's customer, must be neither paused nor deleted, and must have a policy granting `MANAGE_CARDS`. For a standard card it must also hold no standard card that is not `CLOSED`. When several cards qualify, the most recently issued one is handed over.

The customer must still meet what issuing a card requires: an individual customer with approved KYC who has accepted the cardholder agreement. The card is unfrozen as a platform `status: ACTIVE` update is, so the platform receives the same card status webhook; a card whose funding authorization is missing comes back `PENDING_AUTH`. A card that was still being provisioned when its agent was deleted is not handed over. Responds `204` when the customer has no card to hand over.

## Query parameters

- `previousAgentId` string
- `kind` 'STANDARD' | 'PURCHASE': How an agent card is used and funded. | Kind | Description | |------|-------------| | `STANDARD` | A card issued for the agent, by the platform with `POST /cards` or by the agent with `POST /agents/me/cards`. The customer holds the card details and its spend comes from the customer's account; that spend counts against the agent's policy limits as the agent's sends do. The agent can read the card, tighten its merchant categories, and freeze it. | | `PURCHASE` | A single-use virtual card the agent issued for one online purchase with `POST /agents/me/cards`. It is funded from the customer's Embedded Wallet, its spend counts against the agent's policy limits, and it closes after its first approved authorization or when it expires unused. A recurring purchase card (`purchase.recurring`) is instead locked to the first merchant that charges it, may be charged there again up to its monthly limit, and stays open until it is closed. The agent reads its number, expiry and CVV through `POST /agents/me/cards/{cardId}/reveal`. |

## Response `200`

The card now belongs to the agent and is no longer frozen

- Card
  - `id` string, required: System-generated unique card identifier
  - `customerId` string, required: The id of the `Customer` who holds this card.
  - `platformCardId` string: Platform-specific card identifier generated by the server.
  - `status` 'PENDING_KYC' | 'PROCESSING' | 'PENDING_AUTH' | 'ACTIVE' | 'FROZEN' | 'CLOSED', required: Lifecycle status of a card. | Status | Description | |-------|-------------| | `PENDING_KYC` | The cardholder has not yet completed KYC. Cards in this status cannot transact. | | `PROCESSING` | The card has been requested and is being provisioned with the issuer. | | `PENDING_AUTH` | The issuer has provisioned the card, but its USDB Embedded Wallet funding source lacks an active delegated signing key. Complete `POST /auth/delegated-keys` before using the card. | | `ACTIVE` | The card is live and can authorize transactions. | | `FROZEN` | The card is temporarily disabled by the platform or by Grid. New authorizations are declined with `cardDeclinedReason: CARD_NOT_ACTIVE`. Existing settlements and refunds continue to reconcile. A card Grid froze for review, or one frozen as `COMPROMISED`, cannot be unfrozen by the platform. | | `CLOSED` | The card is permanently closed. Terminal, irreversible status. |
  - `statusReason` 'DELEGATION_REQUIRED' | 'ISSUER_REJECTED' | 'CLOSED_BY_PLATFORM' | 'CLOSED_BY_GRID': Reason a card reached a terminal or non-active status. Present on `PENDING_AUTH` and `CLOSED` cards, and on cards that fail provisioning before reaching `ACTIVE`. | Reason | Description | |--------|-------------| | `DELEGATION_REQUIRED` | The card funding source has no usable delegated signing key. Present while the card is `PENDING_AUTH`. | | `ISSUER_REJECTED` | The card issuer rejected provisioning during `PROCESSING`. | | `CLOSED_BY_PLATFORM` | The card was closed via `PATCH /cards/{id}` (`status: CLOSED`) by the platform. | | `CLOSED_BY_GRID` | The card was closed by Grid (e.g. compliance or risk action). |
  - `brand` 'VISA' | 'MASTERCARD': Card network brand. Read-only — determined by Grid when the card is provisioned with the issuer.
  - `form` 'VIRTUAL', required: Physical form factor of the card. Only `VIRTUAL` is supported in v1; `PHYSICAL` will be added in a later release.
  - `pinStatus` 'NOT_SET' | 'OK' | 'BLOCKED': State of the card's PIN. On the Card resource, this is the last known status and is present whenever PIN management is supported. An absent value means PIN management is unavailable for this card; it does not mean `NOT_SET`. Use `GET /cards/{id}` to retrieve `pinStatus`. | Status | Description | |--------|-------------| | `NOT_SET` | No PIN has been set on the card. PIN verification is not enabled. Set one with `POST /cards/{id}/set-pin` or the hosted form returned by `GET /cards/{id}/pin-entry-url`. | | `OK` | A PIN is set and usable. | | `BLOCKED` | The PIN was entered incorrectly three consecutive times and is refused until cleared with `POST /cards/{id}/pin/unblock`, or replaced with `POST /cards/{id}/set-pin`. |
  - `pinUnblockAvailableAt` string, date-time: Earliest time another PIN unblock attempt is allowed. Absent until the unblock allowance is used. Changing the PIN does not reset this time.
  - `last4` string: Last four digits of the card PAN.
  - `expMonth` integer: Card expiration month (1–12).
  - `expYear` integer: Card expiration year (four digits).
  - `fundingSource` string, required: Internal account id that funds this card.
  - `cardCapabilities` CardCapabilities: Actions supported by the card program associated with this resource.
    - `supportsVelocityLimits` boolean, required: Whether this card program supports platform-managed limits through `/card-velocity-limits`. Supported where Grid makes authorization decisions; false where the issuer makes them. Amounts use the card's currency, regardless of its funding source.
    - `supports3dSecurePassword` boolean, required: Whether cards in this program accept a caller-supplied `threeDSecurePassword`.
    - `supportsPanReveal` boolean, required: Whether cards in this program can be revealed through `POST /cards/{id}/reveal`.
    - `supportsDigitalWalletTokenization` boolean, required: Whether cards in this program can be added to Apple Pay, Google Pay, or Samsung Pay from your app through `POST /cards/{id}/tokenize`. Manual entry into a wallet works regardless of this flag.
  - `maxNetworkRiskScore` integer, nullable: Maximum normalized network risk score allowed for real-time card authorizations. Scores range from 0 (lowest risk) to 999 (highest risk). Visa scores are normalized by multiplying the raw 0–99 score by 10. Scores equal to the ceiling are allowed. Authorizations without a score are also allowed. The lowest configured card or platform ceiling applies. Null means no card-specific ceiling. Platform controls still apply.
  - `allowedMccs` string[]: Merchant category codes the card may spend at. Present only on a card issued for an agent; absent when that card may spend at any category not blocked.
  - `blockedMccs` string[]: Merchant category codes a card issued for an agent declines, with `cardDeclinedReason: BLOCKED`. Present only on such a card, which also declines Grid's default agent categories unless `defaultMccBlocksLifted` is true.
  - `agentId` string: The agent the card was issued for, when there is one.
  - `defaultMccBlocksLifted` boolean: Whether the platform lifted Grid's default agent merchant-category blocks on this card. Present only for a card issued for an agent.
  - `currency` string: Currency the card transacts in, fixed at issuance by its card program. USDB-funded cards transact in USD, with funding converted at 1 USDB = 1 USD. Spending limits use the smallest unit of the card's currency (USD cents for USDB-funded cards). Changing the funding source does not change the card's currency or spending-limit units.
  - `processorRef` string: Opaque processor-side reference for the card (e.g. the Lithic card token). Useful for cross-referencing in the processor's dashboards; not used for any Grid request routing.
  - `issuerRef` string: Opaque identifier for the card on the issuer of record (e.g. the Lead Bank account/card identifier). Useful for cross-referencing in issuer dashboards; not used for any Grid request routing.
  - `createdAt` string, date-time, required: Creation timestamp
  - `updatedAt` string, date-time, required: Last update timestamp

## Other responses

- `204`: The customer has no card to hand over
- `400`: Bad request - The agent is paused or its policy does not grant `MANAGE_CARDS`, the customer is not an individual with approved KYC, or the customer has not accepted the cardholder agreement (`CARDHOLDER_AGREEMENT_NOT_ACCEPTED`)
- `401`: Unauthorized
- `403`: Forbidden - Agent card hand-over is not enabled for the platform, or recurring purchase cards are not enabled for a `kind=PURCHASE` request
- `404`: Agent not found
- `409`: Conflict - The agent already holds a standard card that is not `CLOSED` (`AGENT_CARD_EXISTS`, standard cards only), already holds the most open recurring purchase cards allowed (`PURCHASE_CARD_LIMIT_REACHED`, `kind=PURCHASE` only), or the card cannot be unfrozen (`INVALID_STATE_TRANSITION`)
- `500`: Internal service error

## Changes

> 115 revisions in range; 2 not diffed.

- **2026-11-02** `e3a3f79a161f`: 1 info
  - added the new optional `query` request parameter `kind`
- **2026-10-28** `d996ddfb9d2b`: 5 info
  - added the optional property `details/missingFields` to the response with the `400` status
  - added the optional property `details/permission` to the response with the `403` status
  - added the optional property `details/policyDenialReason` to the response with the `403` status
  - added the optional property `details/refusalReason` to the response with the `400` status
  - …1 more
- **2026-10-28** `5abf2bb56bcb`: 1 warning
  - added the new `CORRIDOR_UNDER_MAINTENANCE` enum value to the `code` response property for the response status `403`
- **2026-10-27** `5fbda612feb8`: 6 breaking, 1 info
  - removed the required property `cardCapabilities/supportsSpendLimits` from the response with the `200` status
  - removed the required property `cardCapabilities/supportsSpendLimitsAtIssuance` from the response with the `200` status
  - removed the required property `cardCapabilities/supportsTransactionCountLimit` from the response with the `200` status
  - removed the required property `maxSpendPerDay` from the response with the `200` status
  - …3 more
- **2026-10-26** `e4de0e70d752`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lightsparkdev/apis/grid-api/changes/agents/:agentId/card-handover/post.md)

---

[API](https://skmtc.dev/lightsparkdev/apis/grid-api.md) - [All operations](https://skmtc.dev/lightsparkdev/apis/grid-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lightsparkdev/apis/grid-api/revisions/7a1db46ec552?raw)
