Skip to main content

Verify Register Endpoint

Verifies the emailed registration OTP, creates the user, and returns a Sanctum token.

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

Payload Parameters

Send every field used in Register plus:

ParameterTypeRequiredDescription
codeString | IntegerYesSix-digit OTP sent by email.

email, password, password_confirmation, and first_name remain required. The password must contain at least 6 characters.

Sample Payload

{
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"password": "secret123",
"password_confirmation": "secret123",
"country": "Thailand",
"code": "482193"
}

Sample Response

{
"result": 1,
"message": "success",
"data": {
"token": "3|sanctum-plain-text-token",
"expires_at": "2026-09-25T08:00:00.000000Z",
"user": {
"id": 43,
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"country": "Thailand",
"is_active": true,
"partner_id": 12
}
}
}

The complete response user object follows the shape documented by Login. The token is also returned in the Authorization response header.

Token Metadata

FieldTypeDescription
expires_atDateTimeToken expiration in ISO 8601 format, set to 30 days after the token is issued.

Sample Failure Response

{
"result": 0,
"message": "Invalid code & can you resend code."
}