Skip to main content
POST
Register

Endpoint

Creates a new user account with the provided information. Automatically creates an associated customer profile and sends a welcome email.

Request Body

string
required
User’s email address. Must be a valid email format and unique in the system.
string
required
User’s first name. Must be at least 2 characters long.
string
required
User’s last name. Must be at least 2 characters long.
string
required
User’s password. Must be at least 6 characters long.
string
User’s phone number (optional).

Response

boolean
Indicates whether the request was successful.
object
Contains the newly created user data and JWT token.

Status Codes

Created
Registration successful. Returns user data and JWT token.
Bad Request
Invalid request body or validation error.
Conflict
Email already registered in the system.

Error Response

Example Request

cURL
JavaScript
Python

Example Response

Notes

  • Upon successful registration, a customer profile is automatically created and linked to the user
  • A welcome email is sent asynchronously to the provided email address
  • The JWT token is valid for 7 days from the time of issuance
  • Password is securely hashed using bcrypt before storage
  • The telefono field is optional and can be omitted from the request