Skip to content

User Registration

Register a new user account. The activation OTP email uses ZEPTOMAIL_OTP_TEMPLATE_KEY (registration / activation template), not the login OTP template.

POST /api/users/register/

No authentication required.

{
  "email": "user@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "password": "securepassword123"
}
Field Type Required Description
email string Yes User's email address (must be unique)
first_name string Yes User's first name
last_name string Yes User's last name
password string Yes User's password (min 8 characters recommended)

Response

{
  "message": "Registration successful. Please check your email for OTP to activate your account.",
  "user": {
    "id": 1,
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "image_url": null,
    "image_ref": null,
    "is_active": false,
    "created_at": "2026-01-03T12:00:00Z"
  }
}
{
  "email": ["This field is required."],
  "password": ["This field is required."]
}

Notes

  • The account will be created with is_active=False
  • An OTP will be sent to the provided email address
  • You must activate the account using the OTP before logging in
  • The password is securely hashed before storage

Example Request

curl -X POST https://api.endovillehealth.com/api/users/register/ \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "password": "securepassword123"
  }'