Skip to main content

API Key Format

All requests require an x-api-key header with a valid API key.
sk_{env}_{32_character_random_token_here}
│  │      └─ 32-character random token
│  └──────── environment: live or test
└──────────── prefix: sk (secret key)

Using your API key

Include the key in every request:
curl https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers \
  -H "x-api-key: sk_test_your_api_key_here"

Sandbox vs Production

Key prefixModeBehavior
sk_test_SandboxData is created normally. Metro 2 files are generated but never uploaded to bureaus. Simulated bureau responses are returned.
sk_live_ProductionFull pipeline: data → Metro 2 → SFTP upload → bureau processing → webhook notifications.
Use sandbox keys during development and integration testing. Webhooks fire normally in both modes.

Authentication Errors

ScenarioError CodeHTTP Status
Missing x-api-key headerAUTHENTICATION_ERROR401
Invalid key formatAUTHENTICATION_ERROR401
Key not found or hash mismatchAUTHENTICATION_ERROR401
Partner account suspendedAUTHORIZATION_ERROR403
Key environment mismatchAUTHENTICATION_ERROR401
Example error response
{
  "error": {
    "code": "AUTHENTICATION_ERROR",
    "message": "Missing x-api-key header",
    "request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
  }
}