cURL
curl --request POST \ --url https://api.example.com/api/auth/register \ --header 'Content-Type: application/json' \ --data ' { "roleId": "<string>", "firstName": "<string>", "lastName": "<string>", "username": "<string>", "email": "<string>", "password": "<string>" } '
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": "8d7c6b5a-4321-0987-65ba-fedcba098765", "roleId": "7a9b8c3d-1234-5678-90ab-cdef12345678", "roleCode": "RESIDENT", "roles": [ { "id": "7a9b8c3d-1234-5678-90ab-cdef12345678", "code": "RESIDENT", "description": "Community Resident" } ], "roleIds": ["7a9b8c3d-1234-5678-90ab-cdef12345678"], "roleCodes": ["RESIDENT"], "firstName": "Jane", "lastName": "Smith", "username": "janesmith", "email": "[email protected]", "isActive": true, "createdAt": "2026-03-04T10:30:00Z", "residentInfo": null, "userCommunityIds": [] }, "expiresAt": "2026-03-11T10:30:00Z" }
Create a new user account with role assignment
Show UserDto
curl -X POST https://api.happyhabitat.com/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "roleId": "7a9b8c3d-1234-5678-90ab-cdef12345678", "firstName": "Jane", "lastName": "Smith", "username": "janesmith", "email": "[email protected]", "password": "SecurePass456" }'
VALIDATION_ERROR
INVALID_OPERATION
INTERNAL_ERROR