Build with the AgentCard API

Programmatic card issuing for platforms and agents. Authenticate with an API key, create cards, manage cardholders.

$ npm install -g agent-cards-admin

Full docs →

$ curl -X POST https://api.agentcard.sh/api/v1/cards \ 
  -H "Authorization: Bearer sk_test_..." \ 
  -H "Content-Type: application/json" \ 
  -d '{"amountCents": 2500}'

Get your API key

Click a step to see the command. Four steps from zero to API access.

01 Install the admin CLI

Install the admin CLI globally from npm. This is used to manage organizations and API keys.

02 Log in

Authenticate via magic link — no passwords. Just enter your email and click the link.

03 Create an organization

Set up your organization. You'll be prompted for a name and billing email.

04 Create an API key

Generate a key for your org. The full key is shown only once — save it immediately.

$ npm install -g agent-cards-admin

added 47 packages in 3s

Every endpoint

The full reference for the AgentCard REST API. All endpoints require an Authorization: Bearer sk_test_... header.

POST /api/v1/cards

Issue a single-use virtual Visa card with a spending limit. Cards auto-cancel after one authorized payment.

  • amountCents: Spending limit in cents (positive integer, max $5000) (required)
  • cardholderId: ID of cardholder; uses org owner if omitted

GET /api/v1/cards

List all cards in your organization with optional filters and pagination.

  • status: Filter by card status (OPEN, CLOSED)
  • cardholderId: Filter by cardholder ID
  • limit: Results per page (1-100, default 50)
  • offset: Pagination offset (default 0)

GET /api/v1/cards/:id

Get a card summary — last 4, expiry, balance, and status. Does not include PAN or CVV.

  • :id: Card ID (required)

GET /api/v1/cards/:id/details

Get full card credentials including decrypted PAN and CVV. Use for checkout flows.

  • :id: Card ID (required)

DELETE /api/v1/cards/:id

Close a card immediately. Releases held funds and cancels the card at the provider.

  • :id: Card ID (required)

POST /api/v1/cardholders

Create a cardholder in your organization. Required before issuing cards to specific individuals.

  • firstName: Cardholder first name (required)
  • lastName: Cardholder last name (required)
  • dateOfBirth: ISO date string (e.g. "1990-01-15") (required)
  • phoneNumber: Phone number (required)
  • email: Email address

Start building

Get your API key from the dashboard and start issuing cards programmatically.

$ npm install -g agent-cards-admin

Full docs →