Index documents (content payload)
POST/content-assistance/index/documentJson
Indexes text content supplied directly in the request body, rather than crawling documents from URLs. The texts are chunked and stored for use in retrieval-augmented generation.
Use this endpoint instead of Index documents when the content is not available at a public URL — for example internal documents or text generated on the fly.
- For GENERAL type: only
documentsis required. - For CATEGORY / CATEGORY_SHARED type: provide
documentsplus eitherscopeIds(category concept IDs) orbreadcrumbs. - For PRODUCT type: provide
documentsplus eitherscopeIds(product IDs) oridentifiers. - For CONDITIONAL / CONDITIONAL_SHARED type: provide
documentsplusscopeIds(the IDs of the Conditional Documents the content should be attached to, as listed under AI Knowledge Base in Data Platform).
The _SHARED variants index content across all locales (the project group); the non-shared CATEGORY and CONDITIONAL variants apply to the current locale only. GENERAL and PRODUCT are always locale-specific.
This operation is asynchronous and returns a task that can be monitored via the Tasks endpoint.
Request
Responses
- 200
- 400
- 401
- 404
OK — indexing task started
Bad request — invalid type, missing documents, or missing scopeIds for CATEGORY, CATEGORY_SHARED, PRODUCT, CONDITIONAL, or CONDITIONAL_SHARED type
Unauthorized — invalid or missing API key
Project not found