Skip to main content

Register Endpoint

Validates registration data and emails a six-digit verification code. The user record is created only after Verify Register succeeds.

  • Endpoint: /api/v1/auth/register
  • Method: POST
  • Authentication: Partner token.

Payload Parameters

ParameterTypeRequiredDescription
emailStringYesValid email address.
passwordStringYesMinimum 6 characters.
password_confirmationStringYesMust match password.
first_nameStringYesUser first name.
nameStringOptionalDisplay name.
last_nameStringOptionalUser last name.
tel_dialStringOptionalTelephone dial code.
phoneStringOptionalUser phone number.
countryStringOptionalCountry name.
addressStringOptionalUser address.
genderStringOptionalUser gender.
date_of_birthStringOptionalDate of birth.

Sample Payload

{
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"password": "secret123",
"password_confirmation": "secret123",
"tel_dial": "66",
"phone": "800000000",
"country": "Thailand",
"address": "Bangkok",
"gender": "male",
"date_of_birth": "1995-06-15"
}

Sample Response

{
"result": 1,
"message": "The information has been sent to your email successfully."
}

The OTP is valid for one hour. Submit the same registration payload and the OTP to /api/v1/auth/verify-register.

Sample Failure Response

{
"result": 0,
"message": "user already exist"
}