Register User
Create a new user account with email, password, and name details.π Endpoint
π Request Body
The userβs email address. Must be a valid email format.
The userβs password. Must be at least 8 characters long.
The userβs first name.
The userβs last name.
π€ Request Example
π₯ Response
Success (201 Created)
Error Responses
Email Already Exists (400 Bad Request)
Invalid Email Format (400 Bad Request)
Password Too Short (400 Bad Request)
π What Happens After Registration
- Team Creation: A new team is automatically created for the user
- Role Assignment: User is assigned the
ADMINrole for their team - Default Permissions: User receives default permissions for their role
- Token Generation: Access and refresh tokens are generated
- Welcome Email: A welcome email is sent to the user
π‘οΈ Security Features
- Password Hashing: Passwords are hashed using bcrypt
- Email Verification: Email format is validated
- Rate Limiting: Registration is rate-limited to prevent abuse
- Team Isolation: Each user gets their own team by default
π Validation Rules
- Must be a valid email format
- Must be unique across the system
- Maximum length: 255 characters
Password
- Minimum length: 8 characters
- Should contain a mix of letters, numbers, and symbols
- Cannot be a common password
Names
- Minimum length: 2 characters
- Maximum length: 50 characters
- Can contain letters, spaces, hyphens, and apostrophes
π Next Steps
After successful registration:- Store tokens securely in your application
- Use the access token for API requests
- Implement token refresh when the access token expires
- Set up team settings in the dashboard
π Related Endpoints
- Login - Authenticate existing user
- Google OAuth - Register with Google
- Password Reset - Reset forgotten password
- Get Current User - Get user details