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

# Generate social connection URL

> Returns a browser URL that starts connecting a social network to a workspace. Open the returned URL while signed in to Ocoya to approve OAuth and select profiles.



## OpenAPI

````yaml /openapi.yaml post /social-profiles/connection-url
openapi: 3.1.0
info:
  version: 1.1.0
  title: Ocoya API
  description: REST API reference for Ocoya.
servers:
  - url: https://app.ocoya.com/api/_public/v1
security:
  - ApiKeyAuth: []
paths:
  /social-profiles/connection-url:
    post:
      summary: Generate social connection URL
      description: >-
        Returns a browser URL that starts connecting a social network to a
        workspace. Open the returned URL while signed in to Ocoya to approve
        OAuth and select profiles.
      parameters:
        - in: query
          name: workspaceId
          required: true
          description: Ocoya workspace ID. Get one from `GET /workspaces`.
          schema:
            type: string
            example: cmayvq3hk00017apshay5qezu
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - provider
              properties:
                provider:
                  type: string
                  description: Social network used for the connection flow.
                  enum:
                    - facebook
                    - instagram
                    - x
                    - linkedin
                    - pinterest
                  example: instagram
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: >-
                      Browser URL to open while signed in to Ocoya to start the
                      connection flow.
                    example: >-
                      https://app.ocoya.com/api/social-connect/start?provider=instagram&workspaceId=cmayvq3hk00017apshay5qezu
                required:
                  - url
        '400':
          description: Unsupported provider
        '500':
          description: Unknown error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````