Knowledge Base
List KB categories (bare array)
Example request
curl "https://YOUR-HOST/api/v1/kb/categories" \
-H "Authorization: Bearer $TOKEN"
import requests
response = requests.get(
"https://YOUR-HOST/api/v1/kb/categories",
headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/kb/categories", {
method: "GET",
headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/kb/categories");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);
Responses
200Categories
| Field | Type | Description |
|---|---|---|
| []id | integer | |
| []name | string | |
| []parent_id | integer | |
| []client_id | integer |
Example response
json
[
{
"id": 1,
"name": "string",
"parent_id": 1,
"client_id": 1
}
]
List KB articles (paged, filterable)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| category_id | query | integer | |
| client_id | query | integer | |
| search | query | string | |
| page | query | integer | |
| limit | query | integer |
Example request
curl "https://YOUR-HOST/api/v1/kb/articles" \
-H "Authorization: Bearer $TOKEN"
import requests
response = requests.get(
"https://YOUR-HOST/api/v1/kb/articles",
headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/kb/articles", {
method: "GET",
headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/kb/articles");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);
Responses
200Paged article list
| Field | Type | Description |
|---|---|---|
| data | array of object | |
| data[].id | integer | |
| data[].title | string | |
| data[].category_id | integer | |
| data[].category_name | string | |
| data[].client_id | integer | |
| data[].client_name | string | |
| data[].client_visible | integer | |
| data[].updated_at | string | |
| total | integer |
Example response
json
{
"data": [
{
"id": 1,
"title": "string",
"category_id": 1,
"category_name": "string",
"client_id": 1,
"client_name": "string",
"client_visible": 1,
"updated_at": "string"
}
],
"total": 1
}
KB article detail (content + attachments)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
Example request
curl "https://YOUR-HOST/api/v1/kb/articles/1" \
-H "Authorization: Bearer $TOKEN"
import requests
response = requests.get(
"https://YOUR-HOST/api/v1/kb/articles/1",
headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/kb/articles/1", {
method: "GET",
headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/kb/articles/1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);
Responses
200Article detail
| Field | Type | Description |
|---|---|---|
| id | integer | |
| title | string | |
| category_id | integer | |
| category_name | string | |
| client_id | integer | |
| client_name | string | |
| client_visible | integer | |
| updated_at | string | |
| content | string | |
| attachments | array of object | |
| attachments[].name | string | |
| attachments[].filename | string | |
| attachments[].url | string |
Example response
json
{
"id": 1,
"title": "string",
"category_id": 1,
"category_name": "string",
"client_id": 1,
"client_name": "string",
"client_visible": 1,
"updated_at": "string",
"content": "string",
"attachments": [
{
"name": "string",
"filename": "string",
"url": "string"
}
]
}
404Resource not found
| Field | Type | Description |
|---|---|---|
| error | string |