/api/v1.
Base URL
POST /auth/login means:
Interactive docs
A Swagger UI is available athttp://localhost:3001/api-docs once the backend server is running. Use it to explore and try endpoints directly in the browser.
Request format
All requests with a body must send JSON and include theContent-Type header:
Authentication
Protected endpoints require a JWT token in theAuthorization header using the Bearer scheme:
POST /login. Tokens expire after 30 minutes, after which you must log in again.
See Authentication for full details.
Response format
All responses share a consistent envelope structure.Success response
Always
true for successful responses.Human-readable description of the result.
The response payload. Omitted when the endpoint returns no data (e.g., resource creation with no body).
Optional metadata such as pagination information. Omitted when not applicable.
Success response (with data)
Success response (no data)
Error response
Always
false for error responses.Human-readable description of the error.
Detailed validation errors. Included only on
400 validation failures.Error response (validation)
Error response (auth)
HTTP status codes
| Code | Meaning |
|---|---|
200 | Request succeeded. |
201 | Resource created successfully. |
400 | Bad request — invalid input or duplicate data (e.g., email already registered). |
401 | Unauthorized — missing token, expired token, or invalid credentials. |
403 | Forbidden — valid token but insufficient role permissions. |
404 | Resource not found. |
500 | Internal server error. |