> ## Documentation Index
> Fetch the complete documentation index at: https://outlit-codex-platform-actions-create-update-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect integration

> Connect a provider with direct credentials or create a browser-auth connection session.



## OpenAPI

````yaml /openapi.json post /api/integrations/connect
openapi: 3.1.0
info:
  title: Outlit API
  summary: Public Outlit Platform and Ingest APIs.
  description: >-
    Canonical OpenAPI specification for the public Outlit API surfaces
    documented at docs.outlit.ai.
  version: 1.0.0
servers:
  - url: https://app.outlit.ai
security:
  - bearerAuth: []
tags:
  - name: Platform API
    description: >-
      Authenticated API key routes for customer intelligence tools and
      integration management.
  - name: Ingest API
    description: Public-key event ingestion routes used by Outlit SDKs.
paths:
  /api/integrations/connect:
    post:
      tags:
        - Platform API
      summary: Connect integration
      description: >-
        Connect a provider with direct credentials or create a browser-auth
        connection session.
      operationId: connectIntegration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntegrationConnectRequest'
            example:
              provider: posthog
              config:
                apiKey: phx_...
                region: us
                projectId: '12345'
      responses:
        '200':
          description: Direct credential connection or browser session response.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/IntegrationDirectConnectionResponse'
                  - $ref: '#/components/schemas/IntegrationBrowserSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/PlanConnectionLimit'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    IntegrationConnectRequest:
      type: object
      required:
        - provider
      properties:
        provider:
          $ref: '#/components/schemas/ProviderId'
        config:
          type: object
          description: >-
            Direct credential config. Omit to create a browser-auth connection
            session.
          additionalProperties: true
      additionalProperties: false
    IntegrationDirectConnectionResponse:
      type: object
      required:
        - connected
        - connectionId
        - alreadyConnected
      properties:
        connected:
          type: boolean
        connectionId:
          type: string
        alreadyConnected:
          type: boolean
      additionalProperties: false
    IntegrationBrowserSessionResponse:
      type: object
      required:
        - sessionId
        - connectUrl
        - alreadyConnected
      properties:
        sessionId:
          type: string
        connectUrl:
          type: string
          format: uri
        alreadyConnected:
          type: boolean
      additionalProperties: false
    ProviderId:
      type: string
      description: Public integration provider ID.
      enum:
        - hubspot
        - attio
        - slack
        - fireflies
        - granola
        - google-calendar
        - google-mail
        - posthog
        - stripe
        - supabase
        - clerk
        - pylon
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
      additionalProperties: true
    PlanConnectionLimitError:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
        code:
          type: string
          examples:
            - plan_connection_limit_exceeded
        feature:
          type: string
          examples:
            - integration_connections
        plan:
          type: string
        currentConnections:
          type: integer
        limit:
          type: integer
      additionalProperties: true
    ValidationIssue:
      type: object
      required:
        - path
        - message
      properties:
        path:
          type: array
          items:
            type:
              - string
              - number
        message:
          type: string
      additionalProperties: false
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid request
    Unauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid credentials
    PlanConnectionLimit:
      description: Plan integration connection limit reached.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlanConnectionLimitError'
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Outlit API key using the Bearer ok_... format.

````