Signup
Creates a new user account with the provided credentials. Upon successful registration, returns user details and a JWT access token.Endpoint
Request Body
User’s full name.
User’s email address. Must be a valid email format and unique.
User’s password. Must be at least 6 characters long.
User’s date of birth. Optional field.
Response
Success message indicating the user was created successfully.
The unique identifier assigned to the newly created user.
The email address of the newly created user.
The date of birth of the user (empty string if not provided).
ISO 8601 timestamp of when the user account was created.
The access token is automatically set as an HTTP-only cookie named
access_token with a 10-day expiration. The password is securely hashed using bcrypt before storage.Example Request
Example Response
Error Responses
409 Conflict
Returned when a user with the provided email already exists.400 Bad Request
Returned when validation fails for required fields or password requirements. Missing email:500 Internal Server Error
Returned when a database or server error occurs.Security Notes
- Passwords are hashed using bcrypt with an automatically generated salt
- The JWT token contains the user’s ID and email for authentication
- Email addresses must be unique in the system
- All sensitive operations are wrapped in database transactions