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

# Authorize Connector

> Generate an OAuth authorization URL for connecting a third-party service. Redirect to the returned URL to complete the OAuth flow.



## OpenAPI

````yaml api-reference/openapi/social.json POST /api/connectors
openapi: 3.1.0
info:
  title: Recoup API - Social
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/connectors:
    post:
      description: >-
        Generate an OAuth authorization URL for connecting a third-party
        service. Redirect to the returned URL to complete the OAuth flow.
      requestBody:
        description: Authorization request details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizeConnectorRequest'
      responses:
        '200':
          description: Authorization URL generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeConnectorResponse'
        '400':
          description: Bad request - invalid connector or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - no access to the specified account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    AuthorizeConnectorRequest:
      type: object
      required:
        - connector
      properties:
        connector:
          type: string
          description: >-
            The connector slug to authorize (e.g., 'googlesheets', 'tiktok',
            'youtube', 'twitter', 'linkedin')
        callback_url:
          type: string
          format: uri
          description: Optional custom callback URL after OAuth completion
        account_id:
          type: string
          format: uuid
          description: >-
            Optional account ID to connect a service for a different account
            (e.g., an artist, workspace, or organization). Use this when
            connecting an artist's TikTok or other service. The authenticated
            account must have access. Omit to connect for your own account.
    AuthorizeConnectorResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
        data:
          type: object
          required:
            - connector
            - redirectUrl
          properties:
            connector:
              type: string
              description: The connector slug being authorized
            redirectUrl:
              type: string
              format: uri
              description: URL to redirect to for OAuth authorization
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````