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

# Attach a file to a source



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json post /library/files/{fileId}/source/{sourceId}
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /library/files/{fileId}/source/{sourceId}:
    post:
      tags:
        - Library
      summary: Attach a file to a source
      parameters:
        - name: fileId
          in: path
          description: The ID of the file to attach.
          required: true
          style: simple
          schema:
            type: string
        - name: sourceId
          in: path
          description: The ID of the source to attach the file to.
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: Success
components:
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````