Skip to main content

POST /auth/register

This endpoint is used to create a new user account. It is a public endpoint and does not require authentication. Upon successful registration, a verification email is sent to the user.

Request Body

email
string
required
The user’s email address. Must be a valid and unique email.
password
string
required
The user’s password. Must be at least 8 characters long and meet password strength requirements.
firstName
string
required
The user’s first name. Maximum 50 characters.
lastName
string
The user’s last name. Maximum 50 characters.
company
string
The user’s company name. Maximum 100 characters.

Response

success
boolean
Indicates if the registration was successful.
message
string
Human-readable status message.
user
object
An object containing the newly created user’s information.
tokens
object
An object containing the authentication tokens.
curl -X POST https://api.llmgenerator.com/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
        "email": "[email protected]",
        "password": "securePassword123!",
        "firstName": "John",
        "lastName": "Doe",
        "company": "Acme Inc"
      }'
{
  "success": true,
  "message": "Account created successfully",
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "name": "John Doe",
    "emailVerified": false,
    "createdAt": "2026-01-29T12:00:00.000Z"
  },
  "tokens": {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expiresIn": 900,
    "tokenType": "Bearer"
  }
}