Skip to main content
POST
/
api
/
auth
/
register
Register
curl --request POST \
  --url https://api.example.com/api/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "nombre": "<string>",
  "apellido": "<string>",
  "telefono": "<string>"
}
'
{
  "message": "<string>",
  "user": {
    "id": "<string>",
    "email": "<string>",
    "nombre": {},
    "apellido": {},
    "telefono": {},
    "email_verified": true,
    "tour_version": {},
    "tour_completed_at": {}
  },
  "error": "<string>"
}
Registers a new user in the Contafy platform. After successful registration, a verification email is sent to the provided email address.

Authentication

No authentication required.

Request Body

email
string
required
User’s email address. Must be a valid email format and unique in the system.
password
string
required
User’s password. Should meet security requirements (minimum 8 characters recommended).
nombre
string
User’s first name (optional).
apellido
string
User’s last name (optional).
telefono
string
User’s phone number (optional).

Response

message
string
Success message confirming registration.
user
object
The newly created user object.
id
string
Unique user identifier.
email
string
User’s email address.
nombre
string | null
User’s first name.
apellido
string | null
User’s last name.
telefono
string | null
User’s phone number.
email_verified
boolean
Email verification status. Will be false for newly registered users.
tour_version
string | null
Version of the product tour completed by the user.
tour_completed_at
string | null
Timestamp when the tour was completed.

Example Request

curl -X POST https://api.contafy.com/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "usuario@ejemplo.com",
    "password": "SecurePass123!",
    "nombre": "Juan",
    "apellido": "Pérez",
    "telefono": "+52 55 1234 5678"
  }'

Example Response

{
  "message": "Usuario registrado exitosamente. Por favor verifica tu correo electrónico.",
  "user": {
    "id": "usr_1a2b3c4d5e6f7g8h",
    "email": "usuario@ejemplo.com",
    "nombre": "Juan",
    "apellido": "Pérez",
    "telefono": "+52 55 1234 5678",
    "email_verified": false,
    "tour_version": null,
    "tour_completed_at": null
  }
}

Error Responses

error
string
Error type identifier.
message
string
Human-readable error message.

Common Errors

400 Bad Request
{
  "error": "VALIDATION_ERROR",
  "message": "El email ya está registrado"
}
400 Bad Request
{
  "error": "VALIDATION_ERROR",
  "message": "El formato del email es inválido"
}