Skip to navigation

Authentication

Authenticate requests with your Esendex API key

The Esendex API authenticates every request with an API key passed in the X-API-Key header. Requests without a valid key are rejected.

curl http://gateway-api.e97e9e55a5d242f9a139.uksouth.aksapp.io/v2/balance \
-H "X-API-Key: $ESENDEX_API_KEY" \
-H "AccountReference: EX0000000"

Keep your API key secret. Don’t embed it in client-side code or commit it to source control — load it from an environment variable or a secrets manager instead.

Account reference

Many endpoints operate on a specific account and take an AccountReference header (or an accountReference body field when sending messages). Use the account reference shown in your Esendex account for the account you want to send from, bill against or query.

HeaderRequiredDescription
X-API-KeyAlwaysYour API key.
AccountReferenceEndpoint-dependentThe account the request applies to. Check each endpoint in the API Reference.

Try it in the API Explorer

Every endpoint in the API Reference has a Try it button. Enter your API key once and it’s reused across endpoints for the rest of your session.