Create a reveal session
/reveal-sessionsCreates a short-lived token for retrieving full card numbers and security codes. Send card requests with this token to the revealBaseUrl in the response, not to the API host. Your API key is never sent to that address.
The token works only for GET /cards and GET /cards/{cardId} sent to revealBaseUrl, and it expires five minutes after it is created. It covers each organization where your API key holds both cards:read and cards:reveal and card reveal is enabled. Create the session with an API key. The token is returned once: a retry with the same idempotencyKey returns the session without it.
Request body
idempotencyKeystring
Idempotency key for safe client retries
min length 1
max length 255
Responses
The created reveal session.
application/jsonidstring (uuid)
tokenstring
Bearer token for card requests to revealBaseUrl. Returned only in the response that creates the session.
tokenTypestring
Bearerscopestring
cards:revealorganizationIdsarray of string (uuid)
The organizations whose cards the token can read.
expiresAtstring (date-time)
revealBaseUrlstring (uri)
Send card requests made with token to this base URL, not to the API host.
Bad Request
Unauthorized
The request was not made with an API key, or the key holds both cards:read and cards:reveal in no organization where card reveal is enabled.
The idempotencyKey was already used with a different request, or the session it created has expired.
Too Many Requests — the rate limit was exceeded. Carries a Retry-After header in whole seconds
Request template
curl -X POST 'https://api.flex.one/reveal-sessions' \
-H "Authorization: Bearer $FLEX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"idempotencyKey": "reveal-cards-001"
}'Response 201
{
"id": "f8e27a40-60ba-442d-a4b1-e068f454f384",
"token": "<REVEAL_TOKEN>",
"tokenType": "Bearer",
"scope": "cards:reveal",
"organizationIds": [
"3f8bbfa2-9257-4a7e-86d3-df1797b8e143"
],
"expiresAt": "2026-11-16T14:05:00.000Z",
"revealBaseUrl": "https://example.secure.url.flex.one"
}