Skip to content

Help API ​

The help center — knowledge base articles by category and the AI chat that answers from them.

All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.

MethodPathWhat it does
GET/helpThe knowledge base (categories with their published articles, in order)
GET/help/searchPublished articles whose title or text contains the words (titles first, at most 20)
GET/help/articles/{article}A published article with its text (counts a view)
POST/help/askThe AI's answer from the help articles (10 per minute, a daily limit per person)
GET/admin/helpEvery category with all its articles, drafts and texts included (administrators)
PUT/admin/help/orderOrders the categories and each category's articles (administrators)
POST/admin/help/categoriesA new category, last (administrators)
PATCH/admin/help/categories/{category}Renames a category or changes its icon (administrators)
DELETE/admin/help/categories/{category}Deletes a category with its articles (administrators)
POST/admin/help/articlesA new article, last in its category (administrators)
PATCH/admin/help/articles/{article}Changes an article (moved to another category, it goes last there; administrators)
DELETE/admin/help/articles/{article}Deletes an article (administrators)

GET /help ​

The knowledge base (categories with their published articles, in order)

Responses ​

  • 200 — data: categories (id, name, icon, articles: id and title); meta.ai: whether the AI chat is on and set up; meta.contact_url.
Response fields
FieldTypeRequiredDescription
dataobject[]
metaobject
bash
curl -X GET "https://your-site.com/api/v1/help" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Published articles whose title or text contains the words (titles first, at most 20)

Parameters ​

NameInTypeRequiredDescription
qquerystringAt most 100 characters.

Responses ​

  • 200 — id, title and category of each match.
bash
curl -X GET "https://your-site.com/api/v1/help/search" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /help/articles/{article} ​

A published article with its text (counts a view)

Parameters ​

NameInTypeRequiredDescription
articlepathintegeryes

Responses ​

  • 200 — The article (id, category_id, category, title, body in light markup, views, updated_at).
  • 404 — Missing, or another account's.
bash
curl -X GET "https://your-site.com/api/v1/help/articles/{article}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /help/ask ​

The AI's answer from the help articles (10 per minute, a daily limit per person)

Request body ​

application/json

FieldTypeRequiredDescription
messagesobject[]yesThe conversation, oldest first, ending with the question. At most 20 items.
messages[].rolestringyesOne of: user, assistant.
messages[].contentstringyesAt most 2000 characters.

Responses ​

  • 200 — data.answer (light markup) and data.articles (id, title) it used.
  • 422 —
  • 429 — The day's questions are used up.
  • 502 — The AI could not answer.
  • 503 — The chat is off or not set up.
bash
curl -X POST "https://your-site.com/api/v1/help/ask" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"text"}]}'

GET /admin/help ​

Every category with all its articles, drafts and texts included (administrators)

Responses ​

  • 200 — Categories with articles, in order.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
bash
curl -X GET "https://your-site.com/api/v1/admin/help" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PUT /admin/help/order ​

Orders the categories and each category's articles (administrators)

Request body ​

application/json

FieldTypeRequiredDescription
categoriesinteger[]yes
articlesobjectcategory id => article ids in order (an article listed under another category moves there).

Responses ​

  • 204 — Saved.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
bash
curl -X PUT "https://your-site.com/api/v1/admin/help/order" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"categories":[1],"articles":{}}'

POST /admin/help/categories ​

A new category, last (administrators)

Request body ​

application/json

FieldTypeRequiredDescription
namestringyesAt most 80 characters.
iconstring

Responses ​

  • 201 — Created.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
bash
curl -X POST "https://your-site.com/api/v1/admin/help/categories" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","icon":"text"}'

PATCH /admin/help/categories/{category} ​

Renames a category or changes its icon (administrators)

Parameters ​

NameInTypeRequiredDescription
categorypathintegeryes

Request body ​

application/json

FieldTypeRequiredDescription
namestringAt most 80 characters.
iconstring

Responses ​

  • 200 — Changed.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
bash
curl -X PATCH "https://your-site.com/api/v1/admin/help/categories/{category}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","icon":"text"}'

DELETE /admin/help/categories/{category} ​

Deletes a category with its articles (administrators)

Parameters ​

NameInTypeRequiredDescription
categorypathintegeryes

Responses ​

  • 204 — Deleted.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
bash
curl -X DELETE "https://your-site.com/api/v1/admin/help/categories/{category}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /admin/help/articles ​

A new article, last in its category (administrators)

Request body ​

application/json

FieldTypeRequiredDescription
category_idinteger
titlestringAt most 160 characters.
bodystringLight markup: "## " headings, "- " / "1. " lists, bold, code, links, ``` code blocks. At most 30000 characters.
publishedboolean

Responses ​

  • 201 — Created.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
bash
curl -X POST "https://your-site.com/api/v1/admin/help/articles" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"category_id":1,"title":"text","body":"text","published":true}'

PATCH /admin/help/articles/{article} ​

Changes an article (moved to another category, it goes last there; administrators)

Parameters ​

NameInTypeRequiredDescription
articlepathintegeryes

Request body ​

application/json

FieldTypeRequiredDescription
category_idinteger
titlestringAt most 160 characters.
bodystringLight markup: "## " headings, "- " / "1. " lists, bold, code, links, ``` code blocks. At most 30000 characters.
publishedboolean

Responses ​

  • 200 — Changed.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
bash
curl -X PATCH "https://your-site.com/api/v1/admin/help/articles/{article}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"category_id":1,"title":"text","body":"text","published":true}'

DELETE /admin/help/articles/{article} ​

Deletes an article (administrators)

Parameters ​

NameInTypeRequiredDescription
articlepathintegeryes

Responses ​

  • 204 — Deleted.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
bash
curl -X DELETE "https://your-site.com/api/v1/admin/help/articles/{article}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.