Getting your API key
Log in to your SmsManager account and go to the API & Cloud page. Your primary API key is displayed there. Copy it and store it somewhere secure — you’ll use it in every request you make to the API.Passing your API key
Via header (recommended)
Include your API key in thex-api-key request header. This method is supported on all endpoints across both the JSON API v2 and the REST API.
Via query parameter (simple endpoint only)
On theGET /simple/message endpoint you can authenticate by appending your key as the apikey query parameter instead of using a header.
The
apikey query parameter is only supported on the GET /simple/message endpoint. All other endpoints require the x-api-key header.Managing API keys
You can create and manage sub-keys programmatically through the REST API. Sub-keys are useful when you run multiple integrations or services and want to track usage or revoke access independently. When creating a sub-key you can configure:note— a human-readable label so you can identify which integration uses which keydefault_callback_url— a fallback webhook URL applied to all messages sent with that key when no per-requestcallbackis specifiedshared— set totrueto share credit with the parent account, orfalseto give the sub-key its own separate credit balancecurrency— the billing currency for the sub-key (EURorCZK; must match the parent ifsharedistrue)
API keys are account-scoped. Sub-keys created under your account can either share your credit line or hold their own balance, depending on how you configure the
shared flag when calling the REST API.Security best practices
Follow these guidelines to keep your API keys and your users’ data safe:- Never hardcode API keys in client-side code — keys embedded in browser JavaScript, mobile apps, or public repositories can be extracted and abused
- Use environment variables — load keys from environment variables or a secrets manager (e.g. AWS Secrets Manager, HashiCorp Vault) rather than committing them to source control
- Rotate keys if compromised — if you suspect a key has been leaked, create a new one immediately via app.smsmanager.com/api-cloud or the REST API, update your integrations, and delete the old key
- Use sub-keys per integration — assign a dedicated sub-key to each service or environment (production, staging, etc.) so you can revoke a single key without disrupting everything else
Authentication errors
If your API key is missing, malformed, or not authorised for the requested operation, the API returns an HTTP400 response.