Skip to content

Authorize a single-use grant for revealing the card PAN

POST/v1/cards/{id}/secure-data

Requires an API client bearer token.

Authorizes a 60-second, single-use grant over this card and returns where to redeem it. The caller generates the grant token and sends only its sha256 digest, so nothing redeemable appears in this request or response — the PAN, the expiry and a freshly derived CVV2 come back from the vault reveal endpoint named in `reveal_url`, not from this service. Not idempotency-keyed. A business card is revealed only to whom it may be: its own user, holding can_reveal_own_pan, or a member of its business holding can_reveal_pans (an admin, whose KYC must still hold); seeing all cards (can_view_all_cards) never reveals one. An API client names the person in X-Rigid-Acting-Person (400 acting_person_required without it); console staff may omit it. A business card that authorization would decline (business not active, spend gate closed, membership not active, grant ended, card lost, stolen or terminated) is never revealed (409 business_card_blocked). Every business-card reveal, allowed or refused, is audited before anything is granted. The header on a person card is ignored while business cards are off, and refused while on (400 acting_person_not_applicable).

Parameters

Path parameters

NameRequiredDescription
idrequired

Header parameters

NameRequiredDescription
X-Rigid-Acting-Personoptional

Request body

token_hashstringrequired

Example

curl -X POST https://api.rigid.fi/v1/cards/{id}/secure-data \
  -H "Authorization: Bearer $RIGID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "token_hash": "string"
}'

Responses

201

Grant authorized. Carries the reveal endpoint and the expiry — nothing secret.

reveal_urlstringrequired
expires_atstringrequired
400

Validation error; acting_person_required (an API client revealing a business card); acting_person_not_applicable (the header on a person card while business cards are released); acting_person_invalid (a header that is not a person id, on a business card or while business cards are released)

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401

Authentication required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403

Forbidden — the caller may not use this route; or, on a business card, acting_person_not_permitted (the acting person may not reveal it) or admin_kyc_not_complete (the revealing admin's KYC no longer holds)

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
404

Card not found

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
409

business_card_blocked: authorization would decline this business card

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500

Internal server error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring