Appearance
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.
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
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | ||
meta | object |
bash
curl -X GET "https://your-site.com/api/v1/help" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /help/search
Published articles whose title or text contains the words (titles first, at most 20)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | At 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
article | path | integer | yes |
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
| Field | Type | Required | Description |
|---|---|---|---|
messages | object[] | yes | The conversation, oldest first, ending with the question. At most 20 items. |
messages[].role | string | yes | One of: user, assistant. |
messages[].content | string | yes | At most 2000 characters. |
Responses
- 200 —
data.answer(light markup) anddata.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
| Field | Type | Required | Description |
|---|---|---|---|
categories | integer[] | yes | |
articles | object | category 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 80 characters. |
icon | string |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
category | path | integer | yes |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | At most 80 characters. | |
icon | string |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
category | path | integer | yes |
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
| Field | Type | Required | Description |
|---|---|---|---|
category_id | integer | ||
title | string | At most 160 characters. | |
body | string | Light markup: "## " headings, "- " / "1. " lists, bold, code, links, ``` code blocks. At most 30000 characters. | |
published | boolean |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
article | path | integer | yes |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
category_id | integer | ||
title | string | At most 160 characters. | |
body | string | Light markup: "## " headings, "- " / "1. " lists, bold, code, links, ``` code blocks. At most 30000 characters. | |
published | boolean |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
article | path | integer | yes |
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"