POST /api/auth/register
Creates a new user account with Supabase Auth and initializes a user profile.Request body
The user’s email address. Must be a valid, unique email.
The user’s password. Handled by Supabase Auth — minimum length and complexity rules apply.
The display name for the user. Cannot be blank, cannot exceed 30 characters, and must be unique (case-insensitive) across all profiles.
Response
200 — Success
Confirmation string. Value:
"Registro exitoso".The newly created Supabase Auth user object.
400 — Validation error
Returned when request fields fail validation checks.Description of the validation failure. Possible values:
"El nombre no puede estar en blanco."—nombreis missing or whitespace only."El nombre no puede exceder los 30 caracteres."—nombreexceeds 30 characters."Ese nombre de usuario ya está en uso. Por favor, elige otro."— the display name is already taken.- A Supabase Auth error message — for example, if the email is already registered or the password is too weak.
500 — Server error
Possible values:
"Usuario registrado, pero hubo un error al crear su perfil"— the Auth user was created but writing the profile record failed."Error interno del servidor"— an unexpected error occurred.
Example request
Example responses
Success (200)
Validation error (400)
Server error (500)