Skip to content

API reference / RivetMSP

Meta

GET /validate_api_key Bearer token or API key

Validate the presented token/key (legacy compatibility probe)

Example request

curl "https://YOUR-HOST/api/v1/validate_api_key" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/validate_api_key",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/validate_api_key", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/validate_api_key");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Key is valid

FieldTypeDescription
success string
message string
Example response
json
{
    "success": "True",
    "message": "string"
}

401Missing or invalid credentials

FieldTypeDescription
error string
GET /openapi Public

This OpenAPI 3.0 spec as YAML (public)

Example request

curl "https://YOUR-HOST/api/v1/openapi"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/openapi",
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/openapi", {
  method: "GET",
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/openapi");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
]);
$data = json_decode(curl_exec($ch), true);

Responses

200OpenAPI document

Example response
json
"string"
GET /docs Public

Human-readable HTML API reference (public, self-contained)

Example request

curl "https://YOUR-HOST/api/v1/docs"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/docs",
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/docs", {
  method: "GET",
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/docs");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
]);
$data = json_decode(curl_exec($ch), true);

Responses

200HTML docs page

Example response
json
"string"