Needs keys Pulls the latest documents from Google Drive, OneDrive or Notion into the knowledge base and waits for the sync to finish. Connections without a provider token sync the two mock documents instead.
New documents are added, changed documents are re-ingested, and documents that disappeared from the folder or page are removed from the knowledge base. Connections made through the dashboard OAuth flow refresh their access token first.
Request#
| Path parameter | Type | Required | Description |
|---|---|---|---|
sync_id |
string | Yes | The connection ID, starting with kbsync_. |
This endpoint takes no body.
Example request#
curl -X POST https://api.tried.com.au/sync-knowledge-base-source/kbsync_47800c505ee631a117973dcf \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch(
"https://api.tried.com.au/sync-knowledge-base-source/kbsync_47800c505ee631a117973dcf",
{
method: "POST",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
},
);
const sync = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/sync-knowledge-base-source/kbsync_47800c505ee631a117973dcf",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
sync = res.json()Response#
200 OK
{
"oauth": false,
"oauth_expires_timestamp": null,
"sync_id": "kbsync_47800c505ee631a117973dcf",
"knowledge_base_id": "knowledge_base_9f060d81a4d8df9b04ca6d12",
"provider": "onedrive",
"config": { "folder_id": "root" },
"status": "synced",
"error": null,
"last_synced_timestamp": 1760832000000,
"document_count": 7,
"mock": false
}Fields are described in Add synced source. A failed sync still returns 200 with status: "error" and the provider's message in error.
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request (this route needs the kb scope), or the caller is a read-only dashboard member. |
404 |
Sync <sync_id> not found. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.