curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"full_name": "<string>",
"phone": "<string>",
"role": "<string>"
}
'{
"400": {},
"403": {},
"409": {},
"500": {},
"success": true,
"message": "<string>",
"token": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"full_name": "<string>",
"role": "<string>"
}
}Create a new seller account
curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"full_name": "<string>",
"phone": "<string>",
"role": "<string>"
}
'{
"400": {},
"403": {},
"409": {},
"500": {},
"success": true,
"message": "<string>",
"token": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"full_name": "<string>",
"role": "<string>"
}
}POST /api/auth/register
^\+?[1-9][0-9]{7,14}$curl -X POST https://api.horsetrust.com/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securePassword123",
"full_name": "John Smith",
"phone": "+5491112345678"
}'
{
"success": true,
"message": "User registered successfully",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"full_name": "John Smith",
"role": "seller"
}
}
{
"success": false,
"message": "Password must be at least 8 characters"
}
{
"success": false,
"message": "Cannot register as admin"
}
{
"success": false,
"message": "Email already registered"
}
{
"success": false,
"message": "Server error"
}
is_email_verified: false and is_phone_verified: falseverification_status: "pending"