Key and security model
Who can create a key, what a key can reach, and what every call is checked against.
Who creates a key
- The store owner only, in the dashboard, and never from a support session.
- Only stores on the Pro plan can create keys. A store on Basic or Plus cannot, and a key of a store that moved to another plan is answered 402
feature_locked. - Creating a key is confirmed by a 4-digit code sent to the owner's verified mobile.
- The owner may ask for a code 10 times and create 20 keys every 10 minutes, and the codes for one mobile are capped (5 an hour and 10 a day by default). A store holds at most 20 live keys.
What a key holds
| Part | What it does |
|---|---|
| One store | Each key is bound to one store, and every answer is about that store only. |
| Name | The system that uses it, such as "Odoo main warehouse". One key per system, so you know who did what and can revoke one without the others. |
| Scopes | For each resource none, read, or read and write: {resource}.read or {resource}.read_write, where read_write includes read. A call without the route's scope gets 403 insufficient_scope. See the scope table. |
| IP addresses | Optional: up to 20 addresses or ranges, IPv4 or IPv6. A call from any other address is answered 403 ip_not_allowed. |
| Expiry | Optional: the key stops at the end of that day, Riyadh time. |
| The key itself | zo_live_…, shown once. The list then shows only its prefix and its last use. |
IP allow-list
A key may hold up to 20 IP addresses or ranges, IPv4 or IPv6, such as 203.0.113.7 or 203.0.113.0/24. A call from any other address is answered 403 ip_not_allowed, before the rate count. Leave the list empty to accept calls from any address. Put your servers' addresses in it, and update it before you move a server.
Sensitive scopes
customers.read, customers.read_write (shoppers' data), payments.read_write and shipments.read_write (they move money: a carrier label is paid from the store wallet). The dashboard warns when one is picked. Without customers.read, contact data is taken out of every answer and every webhook.
Revocation and rotation
- Revoking a key on the API keys page stops it at once: the next call with it is answered 401
invalid_token, and the webhooks it created stop. - To rotate: create a new key, move your system to it, then revoke the old one.
- A suspended store keeps answering reads; every write answers 403
store_suspended.
Handling the key in your system
- Keep it in an environment variable or a secrets store, never in code, a repository, logs or an emailed file.
- Send it in
Authorization: Bearer zo_live_…only. A key in the query string is refused: it ends up in logs and browser history. - Add your servers' addresses to the key's list, and an expiry date for a temporary integration.
- Alert on 401, 402 or 403: a revoked key, a plan change, a new address.