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

# Create a connection to a source.

> Call to create a connection to a source. For OAuth-enabled source types, this should be called only after the user has given concent using the concent URL from /initiate-oauth and /oauth-secret-id-exists has returned true.



## OpenAPI

````yaml post /api/connect/connection
openapi: 3.0.3
info:
  title: Graphite API Documentation
  description: API documentation for Graphite
  version: 1.0.0
servers: []
security: []
paths:
  /api/connect/connection:
    post:
      tags:
        - graphite-connect
      summary: Create a connection to a source.
      description: >-
        Call to create a connection to a source. For OAuth-enabled source types,
        this should be called only after the user has given concent using the
        concent URL from /initiate-oauth and /oauth-secret-id-exists has
        returned true.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConnectionRequest'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateConnectionResponse'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateConnectionRequest:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/ConnectSources'
      required:
        - source
    CreateConnectionResponse:
      type: object
      properties:
        success:
          type: boolean
      required:
        - success
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
    ConnectSources:
      oneOf:
        - $ref: '#/components/schemas/notionSourceInputSchema'
        - $ref: '#/components/schemas/zendeskSupportSourceInputSchema'
        - $ref: '#/components/schemas/confluenceSourceInputSchema'
        - $ref: '#/components/schemas/shopifySourceInputSchema'
        - $ref: '#/components/schemas/gitbookSourceInputSchema'
      discriminator:
        propertyName: type
        mapping:
          notion: '#/components/schemas/notionSourceInputSchema'
          zendesk_support: '#/components/schemas/zendeskSupportSourceInputSchema'
          confluence: '#/components/schemas/confluenceSourceInputSchema'
          shopify: '#/components/schemas/shopifySourceInputSchema'
          gitbook: '#/components/schemas/gitbookSourceInputSchema'
    notionSourceInputSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - notion
      required:
        - type
    zendeskSupportSourceInputSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - zendesk_support
        subdomain:
          type: string
        email:
          type: string
        api_token:
          type: string
      required:
        - type
        - subdomain
        - email
        - api_token
    confluenceSourceInputSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - confluence
        domain_name:
          type: string
        email:
          type: string
        api_token:
          type: string
      required:
        - type
        - domain_name
        - email
        - api_token
    shopifySourceInputSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - shopify
        shop:
          type: string
          description: The name of your store, e.g. "my-store" from my-store.myshopify.com
        access_token:
          type: string
          description: The API access token for your Shopify store
      required:
        - type
        - shop
        - access_token
    gitbookSourceInputSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - gitbook
        access_token:
          type: string
          description: Personal access token for authenticating with the GitBook API.
        space_id:
          type: string
          description: The ID of the GitBook space to sync.
      required:
        - type
        - access_token
        - space_id

````