Register user
Create a new user account with email and password.Request body
string
required
User email address. Must be a valid email format.
string
required
User password. Must be at least 8 characters long.
Response
string
Success message confirming user registration.
object
Status codes
201- User successfully registered400- Invalid email format or password requirements not met409- User with this email already exists500- Registration failed due to server error
Login user
Authenticate a user and receive access and refresh tokens.Request body
string
required
User email address.
string
required
User password.
Response
string
JWT access token for authenticating API requests. Valid for a limited time.
string
JWT refresh token for obtaining new access tokens.
object
Status codes
200- Login successful400- Email and password are required401- Invalid credentials500- Login failed due to server error
Refresh access token
Obtain a new access token using a valid refresh token.Request body
string
required
Valid refresh token obtained from login.
Response
string
New JWT access token for authenticating API requests.
string
New JWT refresh token (rotated for security).
Status codes
200- Token refresh successful400- Refresh token is required401- Invalid refresh token500- Token refresh failed due to server error
Get current user
Retrieve the authenticated user’s profile information.This endpoint requires authentication.
Headers
string
required
Bearer token for authentication. Format:
Bearer <jwt>Response
object
Status codes
200- User profile retrieved successfully401- Unauthorized (missing or invalid token)404- User not found500- Failed to get user info