Authenticate your API requests
Send your key in the apikey header and match it to the right environment.
Last updated June 1, 2026
Every Boldswitch API request is authenticated with your API key in the apikey header.
Send your key
Add an apikey header with your live or test key to each request:
curl https://business.boldswitch.ng/api/v1/payment/payments \
-H "apikey: live_YOUR_KEY"
Always call over HTTPS so your key is never sent in the clear.
Match the key to the environment
- live_ keys work only on the live routes (/api/v1/payment).
- test_ keys work only on the sandbox routes (/api/v1/sandbox/payment).
A live key on a sandbox route, or a test key on a live route, is rejected.
If authentication fails
A 403 response with key auth failed means the apikey header is missing, invalid, revoked, or used on the wrong environment. Check the key value and the route prefix.
Tip: Treat the HTTP status as authoritative and log the response body so support can help if something looks off.
What's next
Was this article helpful?