POST /api/auth/register
Create a new user account in the FairMatch AI system. This endpoint registers either a company or candidate user.Authentication
No authentication required.Request body
Full name of the user
Email address for the user account. Must be unique.
User password. Will be hashed using bcrypt before storage. Maximum 72 bytes.
User role type. Available values:
company- For hiring companiescandidate- For job seekers
Response
Unique 8-character user identifier generated on registration
Full name of the registered user
Email address of the registered user
Role assigned to the user (
company or candidate)Example request
Example response
Status codes
User successfully registered
Email already registered
Implementation details
- User IDs are generated as 8-character UUID prefixes
- Passwords are truncated to 72 bytes before bcrypt hashing
- Password hashes are stored in the database, not plaintext passwords
- Email uniqueness is validated before account creation