Authentication
Authenticate BankFXApi requests with your API key in the Authorization header. Learn about key handling, request allowances, and authentication errors.
All /v1 API requests require a valid API key. You can find your key in your workspace.
Authorization header
Send your key directly in the Authorization header. This API does not require a Bearer prefix.
curl --request GET \
'https://api.bankfxapi.com/v1/currencies' \
--header 'Authorization: YOUR_API_KEY'
Keep your key private
Store the key in an environment variable on your server. Avoid committing it to source control, publishing it in screenshots, or sending it from public browser code.
curl --request GET \
'https://api.bankfxapi.com/v1/currencies' \
--header "Authorization: $BANKFX_API_KEY"
Invalid credentials
A missing or invalid key returns HTTP 401 Unauthorized. Check that the header is present, the key is current, and your application is not adding a Bearer prefix.
Plan access and request allowances also apply to authenticated requests. Review your plan and balance in your workspace, and see Pricing for available plans.
Query parameter compatibility
The API also accepts an api_key query parameter. Prefer the Authorization header for new integrations so keys are not included in request URLs or copied links. If both are supplied, the header takes precedence.