Authorize a single-use grant for revealing the card PAN
/v1/cards/{id}/secure-dataRequires 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
| Name | Required | Description |
|---|---|---|
| id | required |
Header parameters
| Name | Required | Description |
|---|---|---|
| X-Rigid-Acting-Person | optional |
Request body
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
201Grant authorized. Carries the reveal endpoint and the expiry — nothing secret.
400Validation 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)
401Authentication required
403Forbidden — 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)
404Card not found
409business_card_blocked: authorization would decline this business card
500Internal server error