Skip to main content
PATCH
/
collections
/
{collectionId}
Update collection
curl --request PATCH \
  --url https://api.thehaystack.ai/v2/haystack/collections/{collectionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "collection": {
    "id": 1,
    "name": "Sunday Sermons",
    "itemDescriptor": "sermon",
    "contentFormat": "sermon",
    "fullService": false,
    "variantTypes": [
      {
        "id": 123,
        "name": "Sermon Video",
        "contentType": "video",
        "indexable": true,
        "displayOrder": 123,
        "collectionId": 123
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Enter your API token from the Haystack dashboard

Path Parameters

collectionId
integer
required

Body

application/json
name
string
description
string | null

Response

200 - application/json

Updated collection

collection
object