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. The key is shown once — save it immediately.

warning

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

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