Users, roles, settings and billing endpoints
| Method & path | Body | Permission | |||
|---|---|---|---|---|---|
GET /users | — | users.manage | |||
POST /users | email, password, display_name, role_id (or role name) — plan user cap → 402 | users.manage | |||
PATCH /users/:id | display_name?, role_id?, status?, password? (ends the user's sessions) | users.manage | |||
DELETE /users/:id | — → `{ id, result: 'deleted' | 'anonymised' }` (owner only, not yourself) | users.manage | ||
POST /users/:id/avatar · DELETE /users/:id/avatar | multipart field avatar (PNG/JPG/WebP ≤ 1 MB); yourself, or anyone with users.manage | signed in | |||
GET /permissions | the catalogue with labels and groups | users.manage | |||
GET /roles · POST /roles · PATCH /roles/:id · DELETE /roles/:id | name, description?, permissions[] (owner role immutable; delete only unused) | users.manage | |||
GET /settings | company, currency, locale, time zone, logos, tenant, plan, accent, brand | signed in | |||
PUT /settings | company_name (unchanged), currency_code, locale, time_zone, accent_color?, brand_name? | settings.manage | |||
| `POST /settings/logo?variant=light | dark·DELETE /settings/logo?variant=` | multipart logo (PNG/JPG/SVG ≤ 512 KB) | settings.manage | ||
GET /me/preferences · PATCH /me/preferences | industry?, low_stock_alert_level { item_id: qty }, single_location? | signed in | |||
GET /tenant/usage | storage used vs plan | signed in | |||
GET /tenant/billing | plan, cycle, seats, days left, limits, usage meters, quote, prices | signed in | |||
POST /tenant/billing/plan | `plan (standard | business), cycle (monthly | annual), currency (INR | USD)` | settings.manage |
GET /ui-config · PUT /ui-config | home?, modules?, journey?, blueprint? (each part replaces that part whole) | signed in / settings.manage | |||
GET /sample-data · POST /sample-data · DELETE /sample-data | — (status state, counts, total; add → 201 with the status; remove → removed) | settings.manage | |||
GET /audit-logs · GET /audit-logs/facets | page, page_size, entity_type, action, actor_id, search, from, to (retention-limited) | settings.manage | |||
POST /feedback · GET /feedback | type, title, description, steps?, severity?, priority?, context, screenshot? | signed in / settings.manage | |||
GET /notifications · POST /notifications/:id/read · POST /notifications/read-all | — | signed in |
Last updated