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

# Link a source

> Create a new connection for a tenant by passing a config object, along with an optional schedule or field_map



## OpenAPI

````yaml post /{env_id}/{flow_id}/{tenant}/linkedSources
openapi: 3.1.0
info:
  title: hotglue API
  version: '1.2'
servers:
  - url: https://api.hotglue.com
security:
  - sec0: []
paths:
  /{env_id}/{flow_id}/{tenant}/linkedSources:
    post:
      summary: Link a source
      description: >-
        Create a new connection for a tenant by passing a config object, along
        with an optional schedule or field_map
      operationId: linked-sources-create
      parameters:
        - name: env_id
          in: path
          description: ID of environment
          schema:
            type: string
          required: true
        - name: flow_id
          in: path
          description: ID of flow
          schema:
            type: string
          required: true
        - name: tenant
          in: path
          description: ID of tenant
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - source
              properties:
                source:
                  type: object
                  description: The source & settings info you wish to link
                  required:
                    - tap
                  properties:
                    tap:
                      type: string
                      description: Name of tap
                    config:
                      type: object
                      description: JSON object containing settings for the source
                    symlink:
                      type: object
                      description: >-
                        Symlink allows you to share credentials with a
                        connection from another flow
                      properties:
                        entity:
                          type: string
                          description: The name of the connector that is already linked
                        id:
                          type: string
                          description: >-
                            The previously linked flow_id containing a user's
                            credentials
                        tenant:
                          type: string
                          description: >-
                            Optional. If using subtenants, the tenant id that
                            has the linked connector.
                schedule:
                  type: object
                  description: The schedule expression to sync on
                  properties:
                    schedule_expression:
                      type: string
                      description: >-
                        A CRON expression defining how often to run jobs for the
                        tenant
                    state:
                      type: string
                      description: Whether the schedule should be enabled or disabled
                      enum:
                        - ENABLED
                        - DISABLED
                field_map:
                  type:
                    - object
                    - 'null'
                  required: false
                  description: The field map to use (if not provided, will use default)
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key

````