PBN.LTD API docs
View as Markdown

Knowledge base

Search the knowledge base.

Help articles for this site

GET/api/v1/sites/{site_id}/help

Scope sites:read

Knowledge-base articles that fit what is going on with this site right now (why it is paused, nameservers not pointed, offline...), with app and public links.

Parameters

NameInTypeRequiredDescription
site_idpathintegeryesThe site id (see GET /sites).

Example

curl -s "https://app.pbn.ltd/api/v1/sites/123/help" \
  -H "Authorization: Bearer $PBN_API_KEY"
import os
import requests

headers = {"Authorization": "Bearer " + os.environ["PBN_API_KEY"]}
r = requests.get("https://app.pbn.ltd/api/v1/sites/123/help", headers=headers, timeout=120)
print(r.status_code, r.json())
const res = await fetch("https://app.pbn.ltd/api/v1/sites/123/help", {
  method: "GET",
  headers: {Authorization: `Bearer ${process.env.PBN_API_KEY}`}
});
console.log(res.status, await res.json());

Response

200

{
  "data": {
    "site_id": 123,
    "topics": [
      "change nameservers at registrar"
    ],
    "articles": [
      {
        "title": "How to change nameservers",
        "slug": "change-nameservers",
        "app_url": "https://app.pbn.ltd/kb/a/change-nameservers/",
        "public_url": "https://pbn.ltd/knowledgebase/change-nameservers/",
        "because": "change nameservers at registrar"
      }
    ]
  }
}

Errors: not_found, rate_limited, scope_missing, unauthorized

Read an article

GET/api/v1/kb/articles/{slug}

Scope kb:read

One article as plain text and as sanitised HTML, with related articles.

Parameters

NameInTypeRequiredDescription
slugpathstringyesArticle slug from a search result.

Example

curl -s "https://app.pbn.ltd/api/v1/kb/articles/change-nameservers" \
  -H "Authorization: Bearer $PBN_API_KEY"
import os
import requests

headers = {"Authorization": "Bearer " + os.environ["PBN_API_KEY"]}
r = requests.get("https://app.pbn.ltd/api/v1/kb/articles/change-nameservers", headers=headers, timeout=120)
print(r.status_code, r.json())
const res = await fetch("https://app.pbn.ltd/api/v1/kb/articles/change-nameservers", {
  method: "GET",
  headers: {Authorization: `Bearer ${process.env.PBN_API_KEY}`}
});
console.log(res.status, await res.json());

Response

200

{
  "data": {
    "slug": "change-nameservers",
    "title": "How to change nameservers",
    "category": "DNS",
    "excerpt": "...",
    "text": "plain text...",
    "html": "<p>...</p>",
    "updated_at": null,
    "app_url": "https://app.pbn.ltd/kb/a/change-nameservers/",
    "public_url": "https://pbn.ltd/knowledgebase/change-nameservers/",
    "related": []
  }
}

Errors: not_found, rate_limited, scope_missing, unauthorized