// API Reference
Card Profiles
Manage vaulted cards: list, read, update, and remove card profiles -- always by token, never by PAN.
Card identity: the X-Card-Token header
Single-card operations never put the card in the URL. The card is identified by its
vault token in the X-Card-Token request header -- an
encrypted reference that resolves to the card before the operation runs. See
Tokens for how the vault token differs from the
charge token.
EXAMPLEHTTP
GET /v1/card-profiles/card Authorization: Bearer ... X-Card-Token: <vault token>
Route map
GET /v1/card-profiles-- list card profiles (paged; filterable). Returns metadata only: brand, last4, expiry, usage, segment -- never card numbers.POST /v1/card-profiles-- create a card profile server-side (see the scope warning below).GET /v1/card-profiles/card-- read one profile (X-Card-Token).PUT /v1/card-profiles/card-- update profile details: contact info, usage window, notes.DELETE /v1/card-profiles/card-- remove the card. This is a secure delete; tokens for the card stop resolving and acard.removedwebhook fires.GET /v1/card-profiles/logs-- the card's audit trail: every read, update, and transaction reference.
Errors on create
POST /v1/card-profiles stores the card only if it passes the tenant's Card Policy:
422 Card Not Accepted(type: https://api.cardvault.dev/errors/card-not-accepted) -- the card's BIN (funding type or brand) is refused by the tenant's Card Policy (account portal, Settings > Card Policy; per-segment overrides apply).detailcarries the tenant's own message. The card is not stored. Unknown BINs follow the policy's unknown-BIN action (default: allow).403 Account Past Due(type: https://api.cardvault.dev/errors/account-past-due) -- your CardVault subscription is 30 or more days past due, so new cards cannot be vaulted. Cards already in the vault keep working (charges, tokens, retrieval). The card is not stored. Update the billing card in the CardVault portal (Billing > Credit Card) to restore vaulting.422 Card Verification Failed-- the card failed Visa PAV (when card verification is enabled for your key).
Sensitive reads and CVV
Two tightly-permissioned operations exist for workflows that genuinely need them:
GET /v1/card-profiles/sad/masked-- masked card data (display-safe).GET /v1/card-profiles/sad/cvv-- a full read including CVV, available only to accounts attested for the corresponding PCI scope and only inside a short-lived, separately-authorized session. Every read is audit-logged.POST /v1/card-profiles/cvv-- re-attach a CVV to a card whose stored CVV window ended (see thecard.cvv_removedwebhook).
Scope warning on server-side create.
POST /v1/card-profiles
accepts raw card data from your server -- which means your server is handling PAN and
sits inside PCI scope (SAQ D territory). Prefer the capture surfaces that keep card
data out of your environment entirely: hosted forms,
card requests, or
embedded fields. The server-side create exists
for migrations and for integrators who have already accepted that scope.
Permissions. Every operation above is individually permissioned on
the API key -- including separate permissions for masked reads, CVV reads, CVV
insert, and log views -- and keys can be segment-scoped.