Skip to main content
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_reason": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "details": {
    "card_product_name": "<string>",
    "is_virtual": true,
    "expiry_date": "2023-12-25",
    "last_four": "1234",
    "replacement_for": "card_xyz123",
    "closed_at": "2023-11-07T05:31:56Z"
  },
  "replaced_by": "card_xyz123",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent requests

Maximum string length: 255

Body

application/json

Request body for creating a new card.

account_id
string
required

The ID of the Account object.

Pattern: ^account_\w+$
Example:

"account_xyz123"

entity_id
string
required

The ID of your entity.

Pattern: ^entity_[^\s]{1,33}$
Example:

"entity_xyz123"

details
object
required

Physical and product attributes of the card.

metadata
object

A set of key-value pairs that can be used to store additional information related to this object.

Response

Card created successfully.

A card object

id
string

The server-generated ID of the Card object.

Pattern: ^card_\w+$
Example:

"card_xyz123"

client_card_id
string
read-only

Client-provided identifier for the card. Present only for cards created via file upload; cards created through the API are identified solely by their server-generated ID.

account_id
string

The ID of the Account object.

Pattern: ^account_\w+$
Example:

"account_xyz123"

entity_id
string

The ID of your entity.

Pattern: ^entity_[^\s]{1,33}$
Example:

"entity_xyz123"

status
enum<string>

Current state of the card.

Available options:
active,
inactive,
closed
status_reason
string
read-only

The reason for the card's current status. Empty when the card is active; otherwise populated. Set via the status-transition endpoints.

created_at
string<date-time>
read-only

Creation timestamp.

updated_at
string<date-time>
read-only

Last update timestamp.

details
object

Physical and product attributes of the card.

replaced_by
string

Server-derived. Set to the ID of the card that replaces this one when another card is created with replacement_for pointing at this card. Never settable by the client on the external API.

Pattern: ^card_\w+$
Example:

"card_xyz123"

metadata
object

A set of key-value pairs that can be used to store additional information related to this object.