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

# Add file to collection

> Add a file to a collection from its ID.



## OpenAPI

````yaml put /collections/{id}/{fileid}
openapi: 3.0.2
info:
  title: Jackal Pin
  description: >-
    This is the API reference for Jackal Pin, an IPFS pinning service running on
    top of the Jackal Protocol, hosted by Jackal Labs.
  termsOfService: https://pin.jackalprotocol.com/terms
  contact:
    email: pinsupport@jackallabs.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://pinapi.jackalprotocol.com/api
security: []
tags:
  - name: keys
    description: Access permissions with JWTs
    externalDocs:
      description: JWT docs
      url: https://jwt.io/introduction
  - name: files
    description: Managing files
  - name: collection
    description: Managing collections
  - name: collection + files
    description: Interactions with files and collections
  - name: accounts
    description: Managing user accounts
  - name: payment
    description: Payment and subscription operations
  - name: system
    description: System information and operations
externalDocs:
  description: More about the Jackal Protocol
  url: https://jackalprotocol.com
paths:
  /collections/{id}/{fileid}:
    put:
      tags:
        - collection + files
      summary: Add file to collection
      description: Add a file to a collection from its ID.
      parameters:
        - name: id
          in: path
          description: Collection ID
          required: true
          schema:
            type: string
        - name: fileid
          in: path
          description: ID of file to be placed
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthorized User
        '500':
          description: Failed to add file to collection
      security:
        - api_key: []
components:
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: JWT

````