Clara-Backend
  1. Auth
Clara-Backend
  • Clara-Backend
    • Get Started
    • Quickstart (Rest API)
    • Quickstart (MCP Server)
    • Auth
      • Register
        POST
      • Google OAuth
        POST
      • Login
        POST
      • Logout
        DELETE
      • Change Password
        PATCH
      • Send OTP
        POST
      • Activate
        POST
      • Enable 2FA
        POST
      • Disable 2FA
        DELETE
    • User
      • View
      • Update
    • API Key
      • View
      • Reset
    • Transaction
      • View All
      • View
    • Task
      • View All
      • View
    • Agent
      • Supported Attachments
      • Analysis
    • Stripe
      • Rate
      • Portal
      • Buy
    • Misc
      • Health
      • Version
  • Flask Backend Boilerplate
    • Get Started
    • Quickstart
    • Auth
      • Register
      • Google OAuth
      • Login
      • Logout
      • Change Password
      • Send OTP
      • Activate
      • Enable 2FA
      • Disable 2FA
    • User
      • View
      • Update
    • Transaction
      • View All
      • View
    • Stripe
      • Rate
      • Portal
      • Buy
    • Misc
      • Health
      • Version
  1. Auth

Login

Prod Env
https://backend.crazi.co/api/v1
Prod Env
https://backend.crazi.co/api/v1
POST
https://backend.crazi.co/api/v1
/auth/session
This endpoint lets a user log in and generate a user token on Clara. Code is only needed if 2FA is turned on and can be generated using the Send OTP endpoint.

Request

Authorization
Basic Auth
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
or
Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠400Bad Request
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://backend.crazi.co/api/v1/auth/session' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "715927"
}'
Response Response Example
200 - Success
{
  "data": {
    "created_at": "Wed, 26 Nov 2025 23:51:28 GMT",
    "credits": 0.0,
    "email": "hello@crazi.co",
    "first_name": "Vibhanshu",
    "id": "user_31e827070dcf44198ec11a9112a9a572",
    "is_2fa_enabled": true,
    "is_active": true,
    "is_dark_mode": true,
    "last_name": "Rathod",
    "token": "calzo_user_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzMxZTgyNzA3MGRjZjQ0MTk4ZWMxMWE5MTEyYTlhNTcyIiwicm9sZSI6InVzZXIiLCJpYXQiOjE3NjQyMDE4MjUuMjg1Njc5LCJleHAiOjE3NjQ4MDY2MjUuMjg1MDI1fQ.nVfVmR48xE-QHRFNPNvN6GIt_CnD_5fk1ak4wiV7FNc",
    "updated_at": "Wed, 26 Nov 2025 23:58:09 GMT"
  },
  "message": "User logged in successfully.",
  "status": "success"
}
Modified at 2025-11-27 01:47:30
Previous
Google OAuth
Next
Logout
Built with