Skip to content

API reference / RivetMSP

Knowledge Base

GET /kb/categories Bearer token or API key

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

FieldTypeDescription
[]id integer
[]name string
[]parent_id integer
[]client_id integer
Example response
json
[
    {
        "id": 1,
        "name": "string",
        "parent_id": 1,
        "client_id": 1
    }
]
GET /kb/articles Bearer token or API key

List KB articles (paged, filterable)

Parameters

NameInTypeDescription
category_idqueryinteger
client_idqueryinteger
searchquerystring
pagequeryinteger
limitqueryinteger

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

FieldTypeDescription
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
}
GET /kb/articles/{id} Bearer token or API key

KB article detail (content + attachments)

Parameters

NameInTypeDescription
idrequiredpathinteger

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

FieldTypeDescription
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

FieldTypeDescription
error string