Accounts and users
All routes use the /api/v1 base path. Except where noted, they require an access token. Organisation settings and user management are owner-only.
Current profile
| Method | Path | Access | Purpose |
|---|---|---|---|
GET | /accounts/me | Authenticated | Read the current user, active store, and available stores. |
PATCH | /accounts/me | Authenticated | Update profile fields such as name, email, occupation, or password. |
GET | /accounts/organisation | Owner | Read organisation details. |
PATCH | /accounts/organisation | Owner | Update organisation details and supported integration settings. |
Store and user management
| Method | Path | Access | Purpose |
|---|---|---|---|
POST | /accounts/switch-store | Authenticated | Select a store and receive a new token pair for that store context. |
GET | /accounts/users | Owner | List users in the organisation. |
POST | /accounts/users | Owner | Create a user; onboarding credentials may be sent through configured messaging. |
DELETE | /accounts/users/{id} | Owner | Deactivate a user. |
Example store switch:
curl -X POST "$ZIADA_API/accounts/switch-store" \
-H "Authorization: Bearer $ZIADA_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"store_id":"<store-uuid>"}'Use the token returned by the switch operation for subsequent calls. Store context is carried in the token rather than passed as a query parameter.
Service balances
| Method | Path | Access | Purpose |
|---|---|---|---|
GET | /accounts/ai-credits | Authenticated | Read the organisation's AI credit usage. |
GET | /accounts/sms-balance | Authenticated | Read SMS credit balance information. |
See authentication for login and token flows. For exact accepted profile and organisation fields, consult the API-owned accounts route reference (opens in a new tab).