Authentication

Most endpoints require a JWT token in the header:

Authorization: Bearer <token>

You can obtain the token from the Login API.


Error Response Format (Common)

All errors return:

{
  "error": {
    "message": "Error message",
    "status": 400
  }
}


1. AUTH APIs

1.1 Register User

POST /auth/local/register

Body

{
  "username": "shamim",
  "email": "[email protected]",
  "password": "123456"
}

Success Response

{
  "jwt": "token",
  "user": { ... }
}


1.2 Login User

POST /auth/local

Body