curl --request POST \
--url https://api.sandbox.lead.bank/v0/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account_id": "account_xyz123",
"entity_id": "entity_xyz123",
"details": {
"card_product_name": "Rewards Visa",
"is_virtual": false,
"card_type": "consumer",
"expiry_date": "2029-01-31",
"last_four": "1234"
},
"metadata": {}
}
'{
"id": "card_xyz123",
"client_card_id": "<string>",
"account_id": "account_xyz123",
"entity_id": "entity_xyz123",
"status": "active",
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"details": {
"card_product_name": "<string>",
"is_virtual": true,
"card_type": "hsa",
"expiry_date": "2023-12-25",
"last_four": "1234",
"replacement_for": "card_xyz123",
"closed_at": "2023-11-07T05:31:56Z"
},
"metadata": {}
}Cards
Create a Card
Beta: This endpoint is in beta and may change before general availability.
Creates a new card.
Business Rules
- A new card is created in the
activestate.statusis system-managed and cannot be set on create; status changes go through the status-transition endpoints. details.replacement_forreferences an existing card that this card replaces. When provided, the referenced card must be inclosedstatus at the time of the write and must not already be referenced by another card.
Idempotency
The Idempotency-Key header is required. Reusing a key with a different request body will return a 422 error.
POST
/
v0
/
cards
curl --request POST \
--url https://api.sandbox.lead.bank/v0/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account_id": "account_xyz123",
"entity_id": "entity_xyz123",
"details": {
"card_product_name": "Rewards Visa",
"is_virtual": false,
"card_type": "consumer",
"expiry_date": "2029-01-31",
"last_four": "1234"
},
"metadata": {}
}
'{
"id": "card_xyz123",
"client_card_id": "<string>",
"account_id": "account_xyz123",
"entity_id": "entity_xyz123",
"status": "active",
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"details": {
"card_product_name": "<string>",
"is_virtual": true,
"card_type": "hsa",
"expiry_date": "2023-12-25",
"last_four": "1234",
"replacement_for": "card_xyz123",
"closed_at": "2023-11-07T05:31:56Z"
},
"metadata": {}
}Authorizations
Headers
Body
application/json
Request body for creating a new card.
Response
Card created successfully.
A card object
Was this page helpful?

