Skip to main content
POST
/
authentication
/
register
curl -X POST https://api.sapfiai.com/authentication/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecureP@ssw0rd",
    "confirmPassword": "SecureP@ssw0rd",
    "userName": "johndoe",
    "phoneNumber": "+1234567890"
  }'
{
  "success": false,
  "userId": null,
  "message": "Validation failed",
  "errors": [
    "La contraseña debe tener al menos 8 caracteres",
    "La contraseña debe contener al menos una letra mayúscula"
  ]
}
Register a new user account in the system.

Authentication

This endpoint does not require authentication.

Request Body

email
string
required
User’s email address. Must be a valid email format.
password
string
required
User’s password. Must meet the following requirements:
  • Minimum 8 characters
  • At least one uppercase letter
  • At least one lowercase letter
  • At least one number
  • At least one special character
confirmPassword
string
required
Password confirmation. Must match the password field.
userName
string
Optional username for the account.
phoneNumber
string
Optional phone number for the account.

Response

success
boolean
Indicates whether the registration was successful.
userId
string
The unique identifier of the newly created user.
message
string
A message describing the result of the operation.
errors
string[]
Array of error messages if registration failed.

Error Responses

{
  "success": false,
  "userId": null,
  "message": "Validation failed",
  "errors": [
    "La contraseña debe tener al menos 8 caracteres",
    "La contraseña debe contener al menos una letra mayúscula"
  ]
}
curl -X POST https://api.sapfiai.com/authentication/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecureP@ssw0rd",
    "confirmPassword": "SecureP@ssw0rd",
    "userName": "johndoe",
    "phoneNumber": "+1234567890"
  }'
{
  "success": true,
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "message": "User registered successfully",
  "errors": null
}

Build docs developers (and LLMs) love