cURL
curl --request POST \ --url https://api.example.com/api/auth/register \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "password": "<string>", "name": "<string>", "walletAddress": "<string>", "role": "<string>" } '
{ "400": {}, "409": {}, "message": "<string>", "token": "<string>", "user": { "id": "<string>", "email": "<string>", "name": "<string>", "role": "<string>", "walletAddress": {} } }
Create a new user account with email and password
USER
ORGANIZER
Authorization
Show user properties
refreshToken
curl -X POST https://api.gatepass.com/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "SecurePass123", "name": "John Doe", "role": "USER" }'
{ "message": "User registered successfully", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": "550e8400-e29b-41d4-a716-446655440000", "email": "[email protected]", "name": "John Doe", "role": "USER", "walletAddress": null } }
{ "error": "Password must be at least 8 characters long" }
{ "error": "User with this email or wallet address already exists" }