curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/update-knowledgebase-status \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"knowledge_base_id": 123,
"status": "active"
}
'{
"message": "<string>",
"data": {
"id": 123,
"name": "<string>",
"status": 123
}
}Update the status of a knowledge base item linked to a campaign. Resets the trained state, requiring re-training.
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/update-knowledgebase-status \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"knowledge_base_id": 123,
"status": "active"
}
'{
"message": "<string>",
"data": {
"id": 123,
"name": "<string>",
"status": 123
}
}/update-knowledgebase-status
Content-Type: application/json
Authentication: Required (workspace auth)
{
"knowledge_base_id": 7,
"status": "active"
}
| Field | Type | Required | Description |
|---|---|---|---|
knowledge_base_id | number | Yes | ID of the knowledge base record |
status | string | Yes | active or inactive |
{
"message": "Knowledge base status updated successfully",
"data": {
"id": 7,
"name": "faq.pdf",
"status": 1
}
}
STATUS and resets TRAINED to 0 (untrained), requiring re-training.| Error | Cause |
|---|---|
Knowledge base not found | Invalid knowledge_base_id or record is deleted |
Associated agent not found | The linked agent has been removed |
curl -X POST https://www.tryunleashx.com/api/v1/global/update-knowledgebase-status \
-H "Content-Type: application/json" \
-H "token: <api_key>" \
-d '{
"knowledge_base_id": 7,
"status": "active"
}'
API token for authentication
Was this page helpful?