Authentication
Test and live API keys, permissions, and why keys stay on your server.
Send your key as a bearer token on every call:
Authorization: Bearer rf_live_...Test and live keys
| Prefix | What it does |
|---|---|
rf_test_ | Returns sample results. Nothing is sent to any provider, nothing is charged, and no contact or consent record is saved. See Testing. |
rf_live_ | Makes real calls. A product that charges, such as X-Ray Finance, charges your X-Ray wallet for each result. Works once the product's setup is done for the subaccount. |
Agency owners and admins create keys on the API page of a subaccount, under Connect. The first time, the page asks them to set up X-Ray Finance for the API, and keys, test or live, can be created once that is done. A key belongs to that subaccount, not to the person who created it, and keeps working if they leave the team. The key is shown once, when it is created: we keep only a fingerprint of it, so copy it then.
Permissions
You pick what a key can do when you create it.
| Product | Permission | Lets the key call |
|---|---|---|
| X-Ray Finance | xrayFinanceChecksRun | POST /v1/public/xray/finance/checks |
| X-Ray Finance | xrayFinanceChecksRead | GET /v1/public/xray/finance/checks/{id} |
| X-Ray Finance | xrayOptOutsRecord | POST /v1/public/xray/opt-outs |
A call the key has no permission for is refused with 403 missingPermission.
Keep keys on your server
Call the API from your server only. Never put a key in website code, a mobile app or a browser extension. Calls that come from a browser (any request with an Origin header) are refused with 403 browserRequestRefused, so a key leaked into a web page cannot read anyone's credit data.
If a key may have been exposed, delete it on the API page right away. Deleting takes effect immediately, and calls with it answer 401 invalidKey.

