Skip to main content
POST
/
cards
Create a card
curl --request POST \
  --url https://api.useproxy.ai/v1/cards \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "<string>",
  "agentId": "<string>",
  "type": "virtual",
  "usage": "multi",
  "status": "<string>",
  "limits": {
    "amount": 123,
    "currency": "<string>",
    "interval": "<string>"
  },
  "policy": {
    "requireIntent": true,
    "requireAttestation": true,
    "requireApproval": true,
    "autoApproveBelow": 123,
    "attestationWindowMinutes": 123,
    "cooldownMinutes": 123,
    "ttlMinutes": 123,
    "ttlDays": 123,
    "limits": {
      "perAuth": 123,
      "perDay": 123,
      "perMonth": 123
    },
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "allowedMerchants": [
      "<string>"
    ],
    "lockToFirstMerchant": true
  },
  "configuration": {},
  "shipping": {},
  "billing": {}
}
'
{
  "id": "<string>",
  "customerId": "<string>",
  "agentId": "<string>",
  "type": "virtual",
  "usage": "single",
  "status": "<string>",
  "last4": "<string>",
  "expMonth": "<string>",
  "expYear": "<string>",
  "limits": {
    "amount": 123,
    "currency": "<string>",
    "interval": "<string>"
  },
  "merchantLock": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "lastSpendAt": "2023-11-07T05:31:56Z",
  "firstSpendAt": "2023-11-07T05:31:56Z",
  "singleUseConsumedAt": "2023-11-07T05:31:56Z",
  "policy": {
    "requireIntent": true,
    "requireAttestation": true,
    "requireApproval": true,
    "autoApproveBelow": 123,
    "attestationWindowMinutes": 123,
    "cooldownMinutes": 123,
    "ttlMinutes": 123,
    "ttlDays": 123,
    "limits": {
      "perAuth": 123,
      "perDay": 123,
      "perMonth": 123
    },
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "allowedMerchants": [
      "<string>"
    ],
    "lockToFirstMerchant": true
  },
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as Bearer <api_key>.

Headers

Idempotency-Key
string

Unique key for idempotent requests (24-hour cache)

Body

application/json
customerId
string
required

Customer ID to issue card for

agentId
string

Agent ID to assign card to

type
enum<string>
default:virtual
Available options:
virtual,
physical
usage
enum<string>
default:multi

Single-use or multi-use card

Available options:
single,
multi
status
string

Initial card status

limits
object
policy
object

Spending policy controls

configuration
object

Card configuration options

shipping
object

Shipping address for physical cards

billing
object

Billing address

Response

Card created

id
string
required

Unique card ID

customerId
string | null

Owner customer ID

agentId
string | null

Assigned agent ID

type
enum<string>

Card type

Available options:
virtual,
physical
usage
enum<string>

Single-use or multi-use card

Available options:
single,
multi
status
string

Card status (e.g., active, locked, canceled)

last4
string | null

Last 4 digits of card number

expMonth
string | null

Expiration month

expYear
string | null

Expiration year

limits
object
merchantLock
string | null

Locked merchant name

expiresAt
string<date-time> | null

Card expiration timestamp (TTL)

lastSpendAt
string<date-time> | null
firstSpendAt
string<date-time> | null
singleUseConsumedAt
string<date-time> | null

Timestamp when single-use card was used

policy
object

Spending policy controls

createdAt
string<date-time> | null