Authentication¶
Protected endpoints accept one of two credential types. Prefer an API key for machine-to-machine integrations; use a Bearer ID token for interactive clients that already sign in with email/password.
Credential methods¶
| Header | Format | Notes |
|---|---|---|
X-API-Key |
rev_<12hex>.<32hex> |
Long-lived key issued from the Revolutio platform. Prefer this for server integrations. |
Authorization |
Bearer <Firebase ID token> |
Short-lived token from POST /authenticate (or Firebase Auth). Expires after 1 hour. |
Warning
Do not put API keys in Authorization. Keys are accepted only via X-API-Key. Putting rev_… in the Bearer header is rejected.
When both headers are present, X-API-Key wins.
Example headers¶
Obtain an ID token¶
Request¶
Body
| Field | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | Registered account email |
password |
string | Yes | Account password |
Response¶
| Field | Type | Description |
|---|---|---|
idToken |
string | Firebase ID token for subsequent calls (≈ 1 hour TTL) |
API keys¶
API keys are created and managed in the Revolutio product (account settings). The plaintext key is shown once at creation; store it in a secrets manager.
| Property | Detail |
|---|---|
| Format | rev_<keyId>.<secret> |
| Header | X-API-Key |
| Scope | Acts as the owning user (same credits, subscription, ownership rules) |
| Revocation | Revoked keys fail auth immediately with 401 |
Info
Keys are hashed at rest. Revolutio never stores the full plaintext after creation.
Using credentials¶
cURL: API key¶
export REV_API_KEY="rev_xxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
curl -sS -X POST https://api.revolutio.systems/search \
-H "Content-Type: application/json" \
-H "X-API-Key: $REV_API_KEY" \
-d '{"identifier": "09215191", "jurisdiction": "GB"}'
cURL: ID token¶
TOKEN=$(curl -sS -X POST https://api.revolutio.systems/authenticate \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "secret"}' \
| jq -r '.idToken')
curl -sS -X POST https://api.revolutio.systems/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"identifier": "09215191", "jurisdiction": "GB"}'
Common auth errors¶
| Status | Body | Cause |
|---|---|---|
401 |
Missing Authorization or X-API-Key header |
No credentials sent |
401 |
Invalid or expired token |
Bad/expired ID token, wrong key, or revoked key |
403 |
Your account access has been suspended… |
Account locked (access_locked) |
See Error Handling for the full status catalogue.