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

# Start OAuth connection

> Initiates an OAuth flow to connect a third-party integration. Returns an authorization URL that the user must visit to grant access, and a connect_id used to poll for completion status.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/integrations/{type}/{provider}/connect
openapi: 3.0.0
info:
  description: >-
    REST API for accessing and managing your Nex data. Generate API keys from
    the Nex web UI and use them to authenticate requests.
  title: Nex Developer API
  contact: {}
  version: '1.0'
servers:
  - url: https://app.nex.ai/api/developers
security: []
paths:
  /v1/integrations/{type}/{provider}/connect:
    post:
      tags:
        - Integrations
      summary: Start OAuth connection
      description: >-
        Initiates an OAuth flow to connect a third-party integration. Returns an
        authorization URL that the user must visit to grant access, and a
        connect_id used to poll for completion status.
      operationId: startIntegrationConnect
      parameters:
        - description: Integration type
          name: type
          in: path
          required: true
          schema:
            type: string
            enum:
              - email
              - calendar
              - messaging
              - crm
        - description: Integration provider
          name: provider
          in: path
          required: true
          schema:
            type: string
            enum:
              - google
              - microsoft
              - slack
              - attio
              - hubspot
              - salesforce
      responses:
        '200':
          description: OAuth authorization URL and connect ID for polling
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/developer.ConnectResponse'
        '400':
          description: Invalid integration type/provider combination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '429':
          description: Rate limit exceeded (10 requests/minute)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    developer.ConnectResponse:
      type: object
      properties:
        auth_url:
          type: string
          description: >-
            OAuth authorization URL. Open this in a browser for the user to
            grant access.
          example: https://accounts.google.com/o/oauth2/v2/auth?...
        connect_id:
          type: string
          description: >-
            Encrypted token to poll for connection status. Expires after 10
            minutes.
          example: eyJ3Ijo...
    httpx.APIError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: 'API key for authentication (format: "Bearer YOUR_API_KEY")'
      type: apiKey
      name: Authorization
      in: header

````