POST /v2/knowledge-bases/{knowledge_base_id}/sync
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.
422
Validation Error
application/json
post/v2/knowledge-bases/{knowledge_base_id}/sync
curlcurl --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?

