Sync document
POST
https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/sync
Force an immediate re-sync of a published document to search
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Path parameters
knowledge_base
string
Required
The library.
Validation:
the library's UUIDStored in
knowledge_bases.idarticle
string
Required
The document.
Validation:
the document's UUIDStored in
knowledge_articles.idErrors
| Status | Meaning | Body |
|---|---|---|
404 |
Library not found | {"message":"No query results for model [App\\Models\\KnowledgeBase] <id>."} |
404 |
Document not found, or it does not belong to that library | {"message":"No query results for model [App\\Models\\KnowledgeArticle] <id>."} |
403 |
Policy denied — outside your organization, or you cannot write to this resource | {"message":"This action is unauthorized."} |
422 |
Document is not published | {"message":"Only published documents can be synced to search indexes."} |
500 |
Sync failed | {"message":"Sync failed. <exception message>","data":{…document, with sync_status: error…}} |
401 |
Missing or invalid bearer token | |
403 |
Feature knowledge_docs not enabled for the account |
Notes
- Requires update (edit) access to the document, not just view access.
- Runs in the same request (no queue wait) — clears embedded_content_hash and sets sync_status to pending immediately before running, so a request that fails midway is still visibly "in progress" rather than silently stuck on stale data.
curl --request POST \
--url https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/sync \
--header 'Authorization: Bearer <YOUR_API_KEY>'
import requests
url = "https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/sync"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
response = requests.post(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"message": "Document synced to search.",
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"knowledge_base_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reseller_id": "f1e2d3c4-b5a6-4978-8901-234567890abc",
"title": "Return Policy",
"content": "<h2>Returns</h2><p>Items can be returned within 30 days of purchase with a receipt.</p>",
"plain_text": "Returns Items can be returned within 30 days of purchase with a receipt.",
"structured_text": "\n\n## Returns\n\nItems can be returned within 30 days of purchase with a receipt.",
"content_hash": "3f9c2a106b4e4a2d9f0a1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5",
"embedded_content_hash": "3f9c2a106b4e4a2d9f0a1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5",
"status": "published",
"char_count": 73,
"chunk_count": 1,
"sync_status": "synced",
"sync_error": null,
"last_synced_at": "2026-07-30T14:45:10.000000Z",
"created_at": "2026-07-30T14:22:03.000000Z",
"updated_at": "2026-07-30T14:45:10.000000Z"
}
}
Response — POST
/knowledge-bases/{knowledge_base}/articles/{article}/sync
200
{
"message": "Document synced to search.",
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"knowledge_base_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reseller_id": "f1e2d3c4-b5a6-4978-8901-234567890abc",
"title": "Return Policy",
"content": "<h2>Returns</h2><p>Items can be returned within 30 days of purchase with a receipt.</p>",
"plain_text": "Returns Items can be returned within 30 days of purchase with a receipt.",
"structured_text": "\n\n## Returns\n\nItems can be returned within 30 days of purchase with a receipt.",
"content_hash": "3f9c2a106b4e4a2d9f0a1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5",
"embedded_content_hash": "3f9c2a106b4e4a2d9f0a1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5",
"status": "published",
"char_count": 73,
"chunk_count": 1,
"sync_status": "synced",
"sync_error": null,
"last_synced_at": "2026-07-30T14:45:10.000000Z",
"created_at": "2026-07-30T14:22:03.000000Z",
"updated_at": "2026-07-30T14:45:10.000000Z"
}
}