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

# Update Collection

> Update a collection's metadata.



## OpenAPI

````yaml PATCH /collections/{collectionId}
openapi: 3.1.0
info:
  title: Haystack API
  description: Content management and semantic search API for Haystack
  version: 2.0.0
  contact:
    name: Haystack Support
    email: support@thehaystack.ai
    url: https://thehaystack.ai
servers:
  - url: https://api.thehaystack.ai/v2/haystack
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Items
    description: Content item management
  - name: Collections
    description: Top-level content organization
  - name: Series
    description: Multi-part content grouping
  - name: Speakers
    description: Content presenter management
  - name: Media
    description: Video and audio asset management
  - name: Search
    description: Semantic content search
  - name: Analytics
    description: Usage statistics and metrics
  - name: Resources
    description: Attach supplementary files, links, and videos to items
  - name: Scriptures
    description: Attach Bible references to items
  - name: Chapters
    description: Time-based chapter markers on media assets
  - name: Stats
    description: Analytics and reporting
  - name: Frontend
    description: Public frontend configuration
paths:
  /collections/{collectionId}:
    patch:
      tags:
        - Collections
      summary: Update collection
      description: Update a collection's metadata.
      parameters:
        - name: collectionId
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Updated collection
          content:
            application/json:
              schema:
                type: object
                properties:
                  collection:
                    $ref: '#/components/schemas/Collection'
components:
  schemas:
    Collection:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Sunday Sermons
        itemDescriptor:
          type: string
          enum:
            - sermon
            - message
            - teaching
            - episode
        contentFormat:
          type: string
          enum:
            - sermon
            - interview
          description: Shape of content in this collection
        fullService:
          type: boolean
          description: True if items are full services (not just a single sermon)
          default: false
        variantTypes:
          type: array
          items:
            $ref: '#/components/schemas/MediaVariantType'
          description: Included when _expand contains 'variantTypes'
    MediaVariantType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          example: Sermon Video
        contentType:
          type: string
          enum:
            - video
            - audio
        indexable:
          type: boolean
          description: Whether this variant can be indexed for search
        displayOrder:
          type: integer
          description: Order shown to users
        collectionId:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API token from the Haystack dashboard

````