API reference
Every route the NestJS API serves, who may call it, and how sign-in, permissions, errors, lists and limits work.
For the Full Stack package
Base URL and response format
Every route is served under the /api prefix. Locally the base URL is http://localhost:8000/api; on a server it is your API's address followed by /api, the same value the dashboard reads from NEXT_PUBLIC_API_BASE_URL. Request bodies are JSON, except the upload. Every answer comes in the same envelope:
{
"success": true,
"data": { },
"message": ""
}data holds the result. message is a short sentence some writes fill in, in the request's language, and empty otherwise. The health check needs no token:
curl http://localhost:8000/api/health{"success":true,"data":{"status":"ok","database":"up"},"message":""}Until the database answers and holds its tables, it answers 503 with "status":"unavailable" and "database":"down". The Docker image's health check reads it.
Errors
A failure keeps the envelope, with success: false and the HTTP status:
{
"success": false,
"data": null,
"message": "That email and password combination didn't work. Please try again.",
"errors": { "email": ["Enter a valid email address (example@domain.com)."] }
}messageis a sentence in the request's language.errorsis filled on a validation failure, with the problems per field. A body field the route does not know is refused.- A guarded route with no token, or an expired one, answers
401; a token without the permission answers403.
Lists and paging
List routes take page and page_count (or limit). page_count is capped at 100; a missing or invalid value falls back to the route's default, 15 for users and 10 for the others.
{ "data": [ ], "page": 1, "limit": 15, "total": 15, "totalPages": 1 }Users come newest first by default (order=asc reverses it); projects newest-updated first; admins newest first; settings by category; roles by name.
Language
Send Accept-Language: ar for Arabic messages; anything else answers in English. Countries, permissions, settings and project names carry both languages as { "en": "…", "ar": "…" } whatever the header says, and the client picks one.
Signing in
Get a token
Post an admin's email and password. A seeded API accepts the Super Admin from the installation guide.
Terminalcurl -X POST http://localhost:8000/api/auth/login -H "Content-Type: application/json" -d '{"email":"admin@example.com","password":"Admin@123"}'Response{ "success": true, "data": { "access_token": "eyJ…", "token_type": "Bearer", "expires_in": "7d", "admin": { "id": 1, "email": "admin@example.com", "username": "…", "roles": [ ], "permissions": [ ] } }, "message": "Signed in successfully." }Send it on every call
Terminalcurl http://localhost:8000/api/auth/me -H "Authorization: Bearer eyJ…"Expected result:
/api/auth/mereturns the signed-in admin with their roles and permissions.
- A token lasts
JWT_EXPIRATION,7dby default. There is no refresh route: sign in again. - A wrong email and a wrong password get the same
401message. - After
RATE_LIMIT_LOGINfailed sign-ins (10 by default) from one address within 15 minutes,POST /api/auth/loginanswers429until the oldest failure is 15 minutes old. The count is kept in memory, so a restart clears it.
| Method | Path | Who can call it | What it does |
|---|---|---|---|
POST | /api/auth/login | Anyone | Sign in with email and password |
GET | /api/auth/me | Any signed-in admin | The signed-in admin, with roles and permissions |
GET | /api/health | Anyone | Readiness: 200 or 503 |
Permissions
Every route below needs Authorization: Bearer with a token, except the ones marked Anyone. Most also need a permission, named module.action; an admin holds the permissions of all their roles. The 25 permissions are listed in Screens, roles and permissions.
Users
The people your product serves, addressed by username. Deleting is a soft delete.
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/users | Admins with users.view | List, with search, email, phone, country_id, username, first_name, last_name, from_date, to_date and order |
GET | /api/users/statistic | Admins with users.view | Totals: total, deleted, verified and unverified |
GET | /api/users/deleted | Admins with users.view | Deleted users, with the same filters |
GET | /api/users/deleted/:username | Admins with users.view | One deleted user |
GET | /api/users/:username | Admins with users.view | One user |
POST | /api/users | Admins with users.create | Create: first_name, last_name, email, password, and optionally username, phone, profile_picture, country_id |
PATCH | /api/users/:username | Admins with users.update | Edit any of those fields |
PATCH | /api/users/:username/change-password | Admins with users.update | Set a new password |
POST | /api/users/:username/make-verified | Admins with users.verify | Mark the email verified |
POST | /api/users/:username/make-unverified | Admins with users.verify | Mark it unverified |
POST | /api/users/:username/resend-verification-email | Admins with users.update | Answers success; sends no mail, ready for your own mail service |
DELETE | /api/users/:username | Admins with users.delete | Soft delete |
POST | /api/users/deleted/:username/restore | Admins with users.restore | Restore |
Projects
Projects carry name, description, environment, status (in-progress, ready or blocked), version, optional image and icon_name, and translations with an en and an ar name and description.
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/projects | Admins with projects.view | List, with name, status and environment |
GET | /api/projects/statistic | Admins with projects.view | Totals by status |
GET | /api/projects/recent | Admins with projects.view | The latest projects, limit 5 by default |
GET | /api/projects/deleted | Admins with projects.view | Deleted projects, with name |
GET | /api/projects/:id | Admins with projects.view | One project |
POST | /api/projects | Admins with projects.create | Create |
PATCH | /api/projects/:id | Admins with projects.edit | Edit |
DELETE | /api/projects/:id | Admins with projects.delete | Soft delete |
POST | /api/projects/deleted/:id/restore | Admins with projects.restore | Restore |
Quick tasks
The overview's to-do list. Every admin has their own and needs no permission: each route reads and writes only the caller's tasks. A task is text and completed.
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/tasks | Any signed-in admin | Your tasks, newest first, with status. The paging fields sit beside data in the envelope, not inside it. |
GET | /api/tasks/history | Any signed-in admin | All your tasks, split into active and completed |
GET | /api/tasks/stats | Any signed-in admin | Your totals |
GET | /api/tasks/:id | Any signed-in admin | One task |
POST | /api/tasks | Any signed-in admin | Create |
PATCH | /api/tasks/:id | Any signed-in admin | Edit |
PATCH | /api/tasks/:id/toggle | Any signed-in admin | Mark done or not done |
DELETE | /api/tasks/:id | Any signed-in admin | Delete |
Admins and your profile
The accounts that sign in to the dashboard. :id accepts an id or a username.
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/admins | Admins with admins.view | List, with email, name and phone |
GET | /api/admins/statistics | Admins with admins.view | Totals |
GET | /api/admins/:id | Admins with admins.view | One admin, with roles |
POST | /api/admins | Admins with admins.create | Create: first_name, last_name, email, password, password_confirmation, and optionally phone, profile_picture, country_id |
PATCH | /api/admins/:id | Admins with admins.edit | Edit |
PATCH | /api/admins/:id/roles | Admins with admins.assign_roles | Replace the roles: role_ids |
DELETE | /api/admins/:id | Admins with admins.delete | Delete |
PATCH | /api/admins/profile | Admins with admins.edit | Edit your own profile |
PATCH | /api/admins/profile/password | Any signed-in admin | Change your own password: current_password, password, password_confirmation |
Roles
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/roles | Admins with roles.view | List, with name, guard_name, created_from and created_to; paged only when both page and page_count are sent |
GET | /api/roles/statistics | Admins with roles.view | Totals |
GET | /api/roles/select | Admins with roles.view | Every role, for a select box |
GET | /api/roles/permissions | Admins with roles.view | Every permission, by module |
GET | /api/roles/:id | Admins with roles.view | One role, with its permissions |
POST | /api/roles | Admins with roles.create | Create: name |
PUT | /api/roles/:id | Admins with roles.edit | Rename: name |
POST | /api/roles/:id/permissions | Admins with roles.assign_permissions | Replace what the role grants: permissions, a list of permission names. Signed-in holders are told at once. |
DELETE | /api/roles/:id | Admins with roles.delete | Delete |
App settings
Key and value pairs with a display name, a description, a type and a category, such as site_name, support_email and maintenance_mode.
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/settings | Admins with settings.view | List, with search and category |
GET | /api/settings/:key | Admins with settings.view | One setting |
PATCH | /api/settings/:key | Admins with settings.edit | Change its value |
DELETE | /api/settings/:key | Admins with settings.edit | Delete it |
Countries and uploads
| Method | Path | Who can call it | What it does |
|---|---|---|---|
GET | /api/helpers/countries | Anyone | The 50 countries as { value, label, code, phone_code }, labelled in the request's language |
POST | /api/helpers/upload | Any signed-in admin | Upload one image as multipart file, with optional path (the folder, uploads by default) and for (profile, cover, logo or default) |
The upload takes one image of at most 10 MB, stores it in your R2 bucket as a JPEG of at most 1920 pixels wide, with a resized copy for its for value, and returns their addresses: original and, for example, 250x250. Without the R2 variables it answers 503 with "Image uploads are not set up on this server yet."
AI assistant and its conversations
Included with your purchase. Sign in to read, or open it in your download.
The assistant's streaming route, its model list and openers, and the saved conversations.
MCP server
Included with your purchase. Sign in to read, or open it in your download.
The MCP endpoint for coding agents and how it is authorised.
Live permission updates
Included with your purchase. Sign in to read, or open it in your download.
The Socket.IO namespace the dashboard listens on, its event and how a connection is authorised.
Demo mode routes
Included with your purchase. Sign in to read, or open it in your download.
The routes a public demo build adds.