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
$curl -X POST https://api.credal.ai/api/v0/documentCollections/reindexDocumentInCollection \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "documentId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
> "documentCollectionId": "82e4b12a-6990-45d4-8ebd-85c00e030c24"
>}'