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

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

Synchronize Knowledge Base

post

Start a one-shot synchronization of 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. Read successful resource payloads under data when a body is returned.

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
response_codestring · nullableOptional

Machine-readable response code, when provided.

post/v2/knowledge-bases/{knowledge_base_id}/sync
curl
curl --fail-with-body -sS -X POST \
  "$STACKAI_BASE_URL/v2/knowledge-bases/${KNOWLEDGE_BASE_ID}/sync" \
  -H "Authorization: Bearer $STACKAI_API_KEY"
{
  "response_code": "text",
  "meta": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "data": {
    "message": "text",
    "status": "accepted"
  }
}

Last updated

Was this helpful?