POST /v1/knowledge-bases/{knowledge_base_id}/sync
Synchronize the knowledge base.
How to use
Requests a one-shot synchronization. A 202 means accepted, not that every resource is indexed. Inspect KB/resource status before querying updated source content.
Authentication and permissions
Required permissions: kbs.sync. Resource and owner access checks also apply.
Authorizations
AuthorizationstringRequired
Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.
Path parameters
knowledge_base_idstring · uuidRequired
Responses
202
Successful Response
application/json
Result of a knowledge base sync or reindex request.
messagestringRequired
Human-readable description of the started task.
statusconst: acceptedOptionalDefault:
Task status.
accepted422
Validation Error
application/json
post/v1/knowledge-bases/{knowledge_base_id}/sync
curlcurl --fail-with-body -sS -X POST \
"$STACKAI_BASE_URL/v1/knowledge-bases/${KNOWLEDGE_BASE_ID}/sync" \
-H "Authorization: Bearer $STACKAI_API_KEY"{
"message": "text",
"status": "accepted"
}PreviousDELETE /v1/knowledge-bases/{knowledge_base_id}/resources/{resource_id}
NextGET /v1/knowledge-bases
Last updated
Was this helpful?

