> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closerx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Login

> Allows User to Log In the system



## OpenAPI

````yaml POST /auth/login/
openapi: 3.1.0
info:
  title: CloserX.ai API
  description: >-
    The CloserX.ai API provides programmatic access to manage AI-powered calling
    operations, including agent creation, campaign management, contact handling,
    telephony integration, and more. This API enables seamless automation and
    integration with CRM systems, telephony providers, and other third-party
    services for enhanced client communication and business operations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.closerx.ai/api
security:
  - api_key: []
paths:
  /auth/login/:
    post:
      description: Allows User to Log In the system
      requestBody:
        description: Login Credentials
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Login'
        required: true
      responses:
        '200':
          description: Login response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    Login:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
          format: email
          description: User's email address
        password:
          type: string
          format: password
          description: User's password
    LoginResponse:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
          description: Indicates whether the login was successful
        message:
          type: string
          description: Message describing the result of the login request
        data:
          type: object
          required:
            - user
          properties:
            user:
              type: object
              required:
                - id
                - email
                - first_name
                - last_name
                - profile_picture
                - contact_number
                - email_verified
                - companies
                - access_token
                - refresh_token
                - is_superadmin
                - agent_exists
                - subscription_status
                - is_suspended
                - ghl_connected
                - term_condition_excepted
                - twilio_type
                - salesforce_connected
                - snowie_connected
                - telnyx_connected
                - spreadsheet_connected
                - login_domain
              properties:
                id:
                  type: integer
                  description: Unique identifier for the user
                email:
                  type: string
                  description: User's email address
                first_name:
                  type: string
                  description: User's first name
                last_name:
                  type: string
                  description: User's last name
                profile_picture:
                  type: string
                  description: URL to the user's profile picture
                contact_number:
                  type: string
                  description: User's contact phone number
                email_verified:
                  type: boolean
                  description: Indicates if the user's email is verified
                companies:
                  type: object
                  required:
                    - user_type
                    - company_id
                    - company_name
                    - company_name_view
                  properties:
                    user_type:
                      type: string
                      description: Type of user within the company
                    company_id:
                      type: integer
                      description: Unique identifier for the company
                    company_name:
                      type: string
                      description: Name of the company
                    company_name_view:
                      type: string
                      description: Display name of the company
                access_token:
                  type: string
                  description: Access token for authentication
                refresh_token:
                  type: string
                  description: Refresh token for renewing access
                is_superadmin:
                  type: boolean
                  description: Indicates if the user is a superadmin
                agent_exists:
                  type: boolean
                  description: Indicates if an agent exists for the user
                subscription_status:
                  type: string
                  description: Status of the user's subscription
                is_suspended:
                  type: boolean
                  description: Indicates if the user's account is suspended
                ghl_connected:
                  type: boolean
                  description: Indicates if GoHighLevel is connected
                term_condition_excepted:
                  type: boolean
                  description: Indicates if terms and conditions are accepted
                twilio_type:
                  type: string
                  description: Type of Twilio integration
                salesforce_connected:
                  type: boolean
                  description: Indicates if Salesforce is connected
                snowie_connected:
                  type: boolean
                  description: Indicates if Snowie is connected
                telnyx_connected:
                  type: boolean
                  description: Indicates if Telnyx is connected
                spreadsheet_connected:
                  type: boolean
                  description: Indicates if spreadsheet integration is connected
                login_domain:
                  type: string
                  description: Domain used for login
    Error:
      required:
        - success
        - message
        - data
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key

````