Skip to main content

Register

POST /api/auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePass123!",
  "name": "Jane Doe"
}
Response:
{
  "user": { "id": "...", "email": "user@example.com", "name": "Jane Doe" },
  "token": "eyJhbGciOiJIUzI1NiIs..."
}

Login

POST /api/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePass123!"
}
Response:
{
  "user": { "id": "...", "email": "user@example.com" },
  "token": "eyJhbGciOiJIUzI1NiIs..."
}

Use the Token

Include the token in the Authorization header for protected endpoints:
GET /api/brands
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Get Current User

GET /api/auth/me
Authorization: Bearer <token>
Returns the authenticated user and organization.