Skip to main content
The AgentCard API is a REST API that lets you programmatically create and manage virtual Visa cards for AI agents.

Base URL

https://api.agentcard.sh/api/v1

Authentication

All requests require a Bearer token with your API key:
Authorization: Bearer sk_test_...
See Authentication for details.

Response format

All responses are JSON. Successful responses return the resource directly. Errors return an error field:
{
  "error": "Description of what went wrong"
}

Pagination

List endpoints support limit and offset query parameters:
ParameterTypeDefaultMaxDescription
limitinteger50100Number of items to return
offsetinteger0Number of items to skip
Paginated responses include total, limit, and offset fields.

Status codes

CodeDescription
200Success
201Resource created
400Invalid request parameters
401Authentication failed
402Payment authorization failed
403Forbidden (suspended org or missing scope)
404Resource not found
409Conflict (e.g. duplicate cardholder email)
422Payment method required
429Rate limit exceeded
500Internal server error
502Provider error (card close failed at Stripe)

Endpoints

Cards

MethodPathDescription
POST/cardsCreate a card
GET/cardsList cards
GET/cards/:idGet a card
GET/cards/:id/detailsGet card details (PAN/CVV)
DELETE/cards/:idClose a card

Cardholders

MethodPathDescription
POST/cardholdersCreate a cardholder
GET/cardholdersList cardholders
GET/cardholders/:idGet a cardholder
PATCH/cardholders/:idUpdate a cardholder
POST/cardholders/:id/payment-method/setupSetup payment method
GET/cardholders/:id/payment-method/statusGet payment method status