cURL
curl --request POST \ --url https://api.example.com/api/auth/register \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "fullName": "<string>", "password": "<string>", "phone": "<string>" } '
{ "success": true, "data": { "user": { "id": "<string>", "email": "<string>", "fullName": "<string>", "phone": {}, "avatar": {}, "emailVerified": true, "createdAt": "<string>" }, "accessToken": "<string>", "refreshToken": "<string>" } }
Register a new user account
Show data properties
Show user properties
{ "success": false, "error": { "message": "Email already registered", "statusCode": 409 } }
{ "success": false, "error": { "message": "Validation error", "statusCode": 400, "details": [] } }
curl -X POST https://api.example.com/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "fullName": "John Doe", "password": "securePassword123", "phone": "+1234567890" }'
{ "success": true, "data": { "user": { "id": "clx1234567890abcdef", "email": "[email protected]", "fullName": "John Doe", "phone": "+1234567890", "avatar": null, "emailVerified": false, "createdAt": "2026-03-04T10:30:00.000Z" }, "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "rt_clx1234567890abcdef" } }