Zum Inhalt springen

Update collection

PUT
/api/collections/{collectionId}
curl --request PUT \
--url https://firma.company-gpt.com/companygpt/rag/api/api/collections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "displayName": "example", "description": "example", "searchLanguage": "example", "extractionInstructions": "example", "imageDescriptionsEnabled": true, "imageDescriptionMode": "all" }'

Update collection metadata. Only the owner or a collection admin may update.

collectionId
required
string format: uuid

Collection UUID

Media typeapplication/json
object
displayName
string
description
string
searchLanguage

Changing this queues a rebuild_fts job

string
extractionInstructions

Updates the structured-extraction prompt; ignored unless the collection has extraction enabled

string
nullable
imageDescriptionsEnabled
boolean
nullable
imageDescriptionMode
string
nullable
Allowed values: all empty_pages

Collection updated

Media typeapplication/json

Collection record as returned by POST /api/collections, GET /api/collections/{id} and PUT /api/collections/{id} (database.Collection, encoded as-is — this is a different, lower-level shape than the enriched CollectionResponse used by the list endpoint).

object
id
required
string format: uuid
name
required
string
displayName
required
string
description
required
string
created_by
string format: uuid
nullable
owner_id
required
string format: uuid
visibility
required
string
Allowed values: private shared public
searchLanguage
required

PostgreSQL text search dictionary, e.g. “english”

string
type
required
string
Allowed values: rag dataset
chunkingStrategy
required
string
Allowed values: recursive markdown semantic
chunkSize
integer
nullable
chunkOverlap
integer
nullable
datasetMode
required

Empty for “rag” collections; “imported” or “live” for “dataset” collections

string
Allowed values: "" imported live
liveSchema

Live-dataset / structured-extraction schema (see LiveSchema)

object
lastIngestedAt
string format: date-time
nullable
structuredExtractionEnabled
required
boolean
extractionInstructions

Omitted from the JSON body when empty

string
extractionMaxPages
integer
nullable
imageDescriptionsEnabled
required
boolean
imageDescriptionMode
required
string
Allowed values: "" all empty_pages
embeddingModel

Omitted from the JSON body when empty

string
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"visibility": "private",
"type": "rag",
"chunkingStrategy": "recursive",
"datasetMode": "",
"imageDescriptionMode": ""
}

Invalid request

Unauthorized

Collection not found (also returned instead of 403 when access is denied)