Document Collections

Reindex Document In Collection

POST
Reindex a document in a document collection. Credal automatically deletes the existing chunks, re-chunks the document's latest contents and runs the collection's embeddings model on each chunk. You can optionally provide new custom metadata for the document.

Request

This endpoint expects an object.
documentId
UUIDRequired
documentCollectionId
UUIDRequired
customMetadata
map from strings to stringsOptional
The optional custom metadata for the document. The fields must match the custom metadata schema for the document collection. If not specified, Credal will use the existing metadata for the document.
POST
1curl -X POST https://api.credal.ai/api/v0/documentCollections/reindexDocumentInCollection \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "documentId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
6 "documentCollectionId": "82e4b12a-6990-45d4-8ebd-85c00e030c24"
7}'