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
The user’s email address. Must be a valid and unique email.
The user’s password. Must be at least 8 characters long and meet password strength requirements.
The user’s first name. Maximum 50 characters.
The user’s last name. Maximum 50 characters.
The user’s company name. Maximum 100 characters.
Response
Indicates if the registration was successful.
Human-readable status message.
An object containing the newly created user’s information. The unique identifier for the user.
The user’s email address.
Whether the email has been verified (initially false).
ISO 8601 timestamp of account creation.
An object containing the authentication tokens. The access token for authenticating subsequent requests. Expires in 15 minutes.
The refresh token for obtaining new access tokens. Expires in 7 days.
Token expiry time in seconds (900 = 15 minutes).
The token type (always “Bearer”).
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 (201)
Email Already Exists (409)
Weak Password (400)
{
"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"
}
}