Logging in verifies the user’s credentials and returns a signed JWT token. Pass this token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Kr-Yogsa/ECE-BOT/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header on every subsequent request that requires authentication. The token encodes the user’s ID, email, and role, and is valid for 24 hours.
POST /auth/login
Request body
The registered email address.
The account password set during signup.
Responses
Confirmation that login succeeded.Example:
"Login successful."A signed JWT to include in the
Authorization header of subsequent requests. Valid for 24 hours.The authenticated user’s profile.
Error responses
| Status | Error message | Cause |
|---|---|---|
| 400 | "Email and password are required." | One or both fields are missing from the request body. |
| 401 | "Invalid email or password." | No account found for this email, or the password is incorrect. |
| 403 | "Complete your invited operator signup first." | The operator account exists but has not completed OTP signup yet. |
| 403 | "Your account is deactivated. Please contact the admin." | An admin has deactivated this account. |
Example
Using the JWT token
All protected endpoints require the token in theAuthorization request header using the Bearer scheme.
| Claim | Description |
|---|---|
user_id | The user’s unique identifier. |
email | The user’s email address. |
role | The user’s role (admin, operator, or user). |
Example — calling a protected endpoint
cURL
Operators who have not completed the signup OTP flow will receive a 403 response even if their password is correct. Direct them to complete registration at
/auth/signup first.