Skip to main content
POST
Login

Endpoint

Authenticates a user using their email address and password. Returns a JWT token upon successful authentication.

Request Body

string
required
User’s email address. Must be a valid email format.
string
required
User’s password. Must be at least 1 character long.

Response

boolean
Indicates whether the request was successful.
object
Contains the authenticated user data and JWT token.

Status Codes

Success
Login successful. Returns user data and JWT token.
Bad Request
Invalid request body or validation error.
Unauthorized
Invalid credentials (incorrect email or password).

Error Response

Example Request

cURL
JavaScript
Python

Example Response

Notes

  • The JWT token is valid for 7 days from the time of issuance
  • Store the token securely and include it in the Authorization header for authenticated requests
  • Password validation requires at least 1 character, but the registration endpoint enforces a minimum of 6 characters