> ## 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.

# Lead Connect User

> Initiates the connection process to GHL (Go High Level) using OAuth `code` and `state` values returned after user authorization.



## OpenAPI

````yaml POST /ghl/connect/user/
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:
  /ghl/connect/user/:
    post:
      summary: Lead Connect User
      description: >-
        Initiates the connection process to GHL (Go High Level) using OAuth
        `code` and `state` values returned after user authorization.
      parameters:
        - name: Company-Name
          in: header
          required: true
          description: Schema name for multi-tenancy
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GHLConnectUserRequest'
      responses:
        '200':
          description: GHL connection successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GHLConnectUserResponse'
        '401':
          description: Unauthorized or invalid token
          content:
            application/json:
              schema:
                $ref: 8ef7df11-ab95-48ed-b489-46a3ada9d15d
components:
  schemas:
    GHLConnectUserRequest:
      type: object
      properties:
        code:
          type: string
          description: Authorization code returned from GHL
          example: a
        state:
          type: string
          description: State value returned from GHL
          example: a
      required:
        - code
        - state
    GHLConnectUserResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: User successfully connected to GHL
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key

````