curl --request POST \
--url https://api.example.com/api/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'{
"400": {},
"401": {},
"500": {},
"success": true,
"message": "<string>",
"token": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"full_name": "<string>",
"role": "<string>",
"is_email_verified": true,
"seller_profile": {
"identity_document": "<string>",
"selfie_url": "<string>",
"verification_status": "<string>",
"verification_method": "<string>",
"verified_at": "<string>",
"is_verified_badge": true
}
}
}Authenticate user and receive JWT token
curl --request POST \
--url https://api.example.com/api/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'{
"400": {},
"401": {},
"500": {},
"success": true,
"message": "<string>",
"token": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"full_name": "<string>",
"role": "<string>",
"is_email_verified": true,
"seller_profile": {
"identity_document": "<string>",
"selfie_url": "<string>",
"verification_status": "<string>",
"verification_method": "<string>",
"verified_at": "<string>",
"is_verified_badge": true
}
}
}POST /api/auth/login
curl -X POST https://api.horsetrust.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securePassword123"
}'
{
"success": true,
"message": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"full_name": "John Smith",
"role": "seller",
"is_email_verified": false,
"seller_profile": {
"verification_status": "pending",
"is_verified_badge": false
}
}
}
{
"success": false,
"message": "Valid email required"
}
{
"success": false,
"message": "Invalid credentials"
}
{
"success": false,
"message": "Server error"
}
is_active: true) can log inlast_login timestamp is automatically updated upon successful loginAuthorization header for protected endpoints