Skip to main content

Authentication

All API requests require an Authorization header with your API key:

Authorization: Bearer pk_live_xxxxxxxxxxxx

Get an API key

Visit policynumbers.com/api, enter your email, and click Generate API key.

If you enter an email address:

  1. A verification link is sent to that address.
  2. Click the link to activate your key (expires after 24 hours).
  3. Once activated, the key is shown on the portal — save it immediately, it is only displayed once.

If you enter a name (no @): The key is shown immediately after generation. Copy it before leaving the page.

warning

Your API key grants access to your verification credits. Never commit it to source control or expose it in client-side code.

info

Free-plan keys that have never been used are automatically deactivated after 7 days. Make your first API call within that window to keep the key active.

Key types

PrefixModeCredits consumed
pk_live_ProductionYes
pk_test_SandboxNo

Generate a test key from the same portal page to develop and test without using real credits.

Using your key

curl -X POST https://policynumbers.com/api/v1/verify \
-H "Authorization: Bearer pk_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"policy_number":"ABC12345","country":"UK","insurance_type":"motor"}'

Error codes

CodeMeaning
401Missing or invalid API key
402Insufficient verification credits
429Rate limit exceeded