Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
cards
Create card
curl --request POST \
  --url https://api.useproxy.ai/v1/agents/{agentId}/cards \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "purpose": "Book flight LAX to JFK",
  "type": "single",
  "maxAmount": 50000
}
'
{
  "id": "card_abc123",
  "agentId": "agent_xyz789",
  "userId": "user_def456",
  "type": "single",
  "purpose": "Book flight LAX to JFK",
  "credentialExposure": "rawPan",
  "status": "active",
  "last4": "4242",
  "expirationMonth": "12",
  "expirationYear": "2025",
  "maxAmount": 50000,
  "createdAt": 1703520000000
}

Authorizations

Api-Key
string
header
required

API key for authentication. Get your key from the Dashboard.

Path Parameters

agentId
string
required

The agent ID

Body

application/json
purpose
string
required

Human-readable description of what this card is for

type
enum<string>
default:single

Card type: single (one-time) or multi (reusable with velocity limits)

Available options:
single,
multi
maxAmount
integer

Maximum transaction amount in cents

merchantHint
string

Expected merchant name (for multi cards)

limits
object
maxAuthCount
integer

Maximum number of authorizations

ttlDays
integer

Card lifetime in days (legacy, use ttlMinutes)

ttlMinutes
integer

Card auto-expires after N minutes

onExpiry
enum<string>

Action when TTL expires

Available options:
freeze,
close
activeHoursStart
integer

Hour (0-23) when card becomes active

Required range: 0 <= x <= 23
activeHoursEnd
integer

Hour (0-23) when card becomes inactive

Required range: 0 <= x <= 23
activeTimezone
string

IANA timezone (e.g., America/New_York)

activeDays
integer[]

Days of week (0=Sun, 1=Mon, ..., 6=Sat)

Required range: 0 <= x <= 6
cumulativeMax
integer

Close after total spending reaches this (cents)

cooldownMinutes
integer

Minimum time between transactions (minutes)

requireAttestation
boolean

Must declare intent before each use

intentTolerance
number

Max % deviation from declared amount (0.0-1.0)

Required range: 0 <= x <= 1
attestationWindowMinutes
integer
default:10

Window for attestation correlation

Required range: 1 <= x <= 60
onDrift
enum<string>

Action when merchant doesn't match. Default: alert for multi-use cards

Available options:
freeze,
alert
merchantDriftEnabled
boolean

Enable/disable merchant drift detection. Default: true for multi-use cards. Set to false for multi-merchant cards.

requireApproval
boolean

When true, intents require human approval before agent can access credentials

autoApproveBelow
integer

Auto-approve intents below this amount (cents). Requires requireApproval=true

feeOverride
object

Card-level fee override (rake)

riskPolicy
object

Card-level risk policy override

Response

Card created

id
string
required
agentId
string
required
userId
string
required
type
enum<string>
required

Card type

Available options:
single,
multi
purpose
string
required
status
enum<string>
required
Available options:
notActivated,
active,
frozen,
closed
last4
string
required

Last 4 digits of card number

createdAt
integer
required
expirationMonth
string
expirationYear
string
limits
object
merchantHint
string
ttlDays
integer
requireApproval
boolean

Whether intents require human approval before credential access

autoApproveBelow
integer

Auto-approve intents below this amount (cents)