Authentication
Every request carries an API key in the Authorization header:
GET /api/v1/sims HTTP/1.1
Host: app.zentarinetworks.com
Authorization: Bearer axis_live_3k9QmZr…
API keys
Keys are made and revoked in the Axis portal by an admin, under Settings > Tenant > Developer API. They can't be created through the API: a key that could make keys could never be fully taken back.
| Format | Starts axis_live_, followed by random characters |
| Shown | Once, when it's made. Axis only keeps a fingerprint of it, so it can't show it again |
| How many | Up to 20 per account. Give each system its own key, named after it |
| Revoking | In the portal. Requests with that key get 401 straight away |
Read-only or full access
Each key has one of two access levels:
| Access | Can do | Use it for |
|---|---|---|
read_only | GET requests only | Dashboards, reporting, monitoring |
full | Everything | Systems that provision, suspend, order or top up |
A read-only key that tries to change something gets 403 with the code
insufficient_access. GET /account tells you which key you're using and its
access, so it's a good way to check a key before you rely on it.
Keeping keys safe
- Keep keys on your servers, never in a browser, a mobile app, or source control.
- Use read-only keys wherever you only need to read.
- Make one key per system, so you can revoke one without touching the others.
- If a key might have leaked, revoke it in the portal and make a new one. There's no need to contact us first.
When it goes wrong
| Status | code | Meaning |
|---|---|---|
401 | unauthorized | No key was sent, or the header isn't Authorization: Bearer … |
401 | invalid_api_key | The key doesn't exist or was revoked |
403 | insufficient_access | A read-only key tried to make a change |
403 | account_suspended | Your Axis account is suspended (usually an unpaid invoice); every request is refused until it's sorted |
:::note Account suspension
While an account is suspended, every API request gets 403 account_suspended, including GETs. The portal tells you
why, and support@zentarinetworks.com can help.
:::