For the complete documentation index, see llms.txt. This page is also available as Markdown.

POST /v1/knowledge-bases/{knowledge_base_id}/sync

Synchronize Knowledge Base

post

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: acceptedOptional

Task status.

Default: accepted
post/v1/knowledge-bases/{knowledge_base_id}/sync
curl
curl --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"
}

Last updated

Was this helpful?