Skip to main content
POST
/
auth
/
register
curl -X POST http://localhost:3000/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "password": "secret123"
  }'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "clxyz123",
    "name": "John Doe",
    "email": "john@example.com"
  }
}

Body

name
string
required
Full name of the user.
email
string
required
Valid email address.
password
string
required
Password (min. 6 characters).

Response

access_token
string
JWT Bearer token to use in subsequent requests.
user
object
Created user object containing id, name, and email.
curl -X POST http://localhost:3000/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "password": "secret123"
  }'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "clxyz123",
    "name": "John Doe",
    "email": "john@example.com"
  }
}