Public APIKnowledge items
Update a knowledge item
Every update currently re-indexes the item, including changes limited
to name, group_id, or active. sync_status.state resets to
pending and follows the same lifecycle as a fresh create:
pending → syncing → synced (success) or failed (terminal).
Use a client-side polling timeout because a queueing failure can leave the item pending.
AuthorizationBearer <token>
API key in the Authorization: Bearer <key> header.
Keys are created in the SMAO dashboard (Settings → API Keys).
In: header
Path Parameters
knowledge_item_idstring
Match
^[a-f0-9]{24}$group_id?string
Match
^[a-f0-9]{24}$name?string
Trimmed of leading/trailing whitespace before storage.
Length
1 <= length <= 200text?string
Length
1 <= length <= 5000000active?boolean
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.smao.ai/api/v1/knowledge-items/string" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": "string",
"group_id": "string",
"name": "Shipping Policy",
"active": true,
"text_length": 5000000,
"sync_status": {
"state": "pending",
"synced_at": "2019-08-24T14:15:22Z",
"total_chunks": 0,
"estimated_duration_ms": 0,
"error": "string"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "validation_failed",
"message": "Validation failed"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API key"
}
}{
"error": {
"code": "subscription_required",
"message": "This feature is not available in your current subscription. Please upgrade to a higher plan"
}
}{
"error": {
"code": "forbidden",
"message": "No permission"
}
}{
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred."
}
}