# Help, contact and legal texts

> Read and search the Help Center, say whether an article helped, reach support, read the legal texts, and answer the feedback form.

Source: https://docs.b7r.app/help

> Ids, names and times in the examples are samples. Read the real values from the API.

> Reads and helpful answers count as they do in the app, and your keys share the Help Center’s hourly budget with the people in the app. A count past it is simply not counted: an article always answers.

## List the Help Center articles

`GET /v1/help/articles`

Every published article in the Help Center’s order, both languages, without its answer. `topic` narrows the list to one topic. `most_read_ids` is the Help Center’s الأكثر قراءة, most read first; while B7R cannot read the counts it lists the first five articles in the Help Center’s order instead, and the articles still answer.

Key: A key with the `tickets:read` area.

Query:

- `topic` (string): One of `getting_started`, `products`, `stores`, `orders_shipping`, `wallet`, `account`.

Answer:

- `data` (array of object, required)
  - `id` (string (uuid), required)
  - `slug` (string, required)
  - `topic` (string or null, required)
  - `title_ar` (string, required)
  - `title_en` (string, required)
  - `updated_at` (string, required): UTC, ISO 8601, milliseconds, Z
- `most_read_ids` (array of string (uuid), required): The most-read articles, most read first, as the Help Center lists them

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/help/articles \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/help/articles", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/help/articles",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "data": [
    {
      "id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
      "slug": "top-up-your-wallet",
      "topic": "wallet",
      "title_ar": "كيف أعبئ رصيد المحفظة؟",
      "title_en": "How do I top up my wallet?",
      "updated_at": "2026-11-20T08:00:00.000Z"
    }
  ],
  "most_read_ids": [
    "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c"
  ]
}
```

## Read one article

`GET /v1/help/articles/{id}`

The article with its answer in both languages. The read is counted once a day per account, as in the app. An article that is not published answers `404 not_found`.

Key: A key with the `tickets:read` area.

Path:

- `id` (string (uuid), required)

Answer:

- `id` (string (uuid), required)
- `slug` (string, required)
- `topic` (string or null, required)
- `title_ar` (string, required)
- `title_en` (string, required)
- `updated_at` (string, required): UTC, ISO 8601, milliseconds, Z
- `answer_ar` (string, required)
- `answer_en` (string, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `not_found` (404), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/help/articles/{id} \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/help/articles/{id}", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/help/articles/{id}",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
  "slug": "top-up-your-wallet",
  "topic": "wallet",
  "title_ar": "كيف أعبئ رصيد المحفظة؟",
  "title_en": "How do I top up my wallet?",
  "updated_at": "2026-11-20T08:00:00.000Z",
  "answer_ar": "من صفحة المحفظة اختر تعبئة الرصيد، ثم اختر طريقة الدفع.",
  "answer_en": "From the wallet page, choose Top up, then the way to pay."
}
```

## Search the articles

`POST /v1/help/search`

The Help Center’s own search, best match first, at most 20. It searches the language you name in `locale`, or the request’s language when you name none.

Key: A key with the `tickets:read` area. Send `Idempotency-Key` and `Content-Type: application/json`.

Body:

- `query` (string, required): 1 to 200.
- `locale` (string): The language searched; the request locale when absent One of `ar`, `en`.

Answer:

- `data` (array of object, required)
  - `id` (string (uuid), required)
  - `slug` (string, required)
  - `topic` (string or null, required)
  - `title_ar` (string, required)
  - `title_en` (string, required)
  - `updated_at` (string, required): UTC, ISO 8601, milliseconds, Z

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `idempotency_key_required` (400), `request_too_large` (413), `unsupported_media_type` (415), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl -X POST https://api.b7r.app/v1/help/search \
  -H "Authorization: Bearer $B7R_API_KEY" \
  -H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "تعبئة الرصيد",
    "locale": "ar"
  }'
```

```javascript
const res = await fetch("https://api.b7r.app/v1/help/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "query": "تعبئة الرصيد",
    "locale": "ar"
  }),
});
const data = await res.json();
```

```python
import os, requests, uuid

res = requests.post(
    "https://api.b7r.app/v1/help/search",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "query": "تعبئة الرصيد",
        "locale": "ar"
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "data": [
    {
      "id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
      "slug": "top-up-your-wallet",
      "topic": "wallet",
      "title_ar": "كيف أعبئ رصيد المحفظة؟",
      "title_en": "How do I top up my wallet?",
      "updated_at": "2026-11-20T08:00:00.000Z"
    }
  ]
}
```

## Say whether an article helped

`POST /v1/help/articles/{id}/vote`

One answer per article a year, as in the app. `counted` is `false` when this account already answered the article this year, or the hour’s budget is used; the call still succeeds.

Key: A key with the `tickets:write` area. Send `Idempotency-Key` and `Content-Type: application/json`.

Path:

- `id` (string (uuid), required)

Body:

- `helpful` (boolean, required)

Answer:

- `counted` (boolean, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `not_found` (404), `invalid_request` (400), `idempotency_key_required` (400), `request_too_large` (413), `unsupported_media_type` (415), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504), `idempotency_mismatch` (409), `idempotency_in_flight` (409). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl -X POST https://api.b7r.app/v1/help/articles/{id}/vote \
  -H "Authorization: Bearer $B7R_API_KEY" \
  -H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
  -H "Content-Type: application/json" \
  -d '{
    "helpful": true
  }'
```

```javascript
const res = await fetch("https://api.b7r.app/v1/help/articles/{id}/vote", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "helpful": true
  }),
});
const data = await res.json();
```

```python
import os, requests, uuid

res = requests.post(
    "https://api.b7r.app/v1/help/articles/{id}/vote",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "helpful": True
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "counted": true
}
```

## How to reach support

`GET /v1/support-contact`

The WhatsApp link and the email the Help Center shows. Either is `null` when B7R has not set it.

Key: A key with the `tickets:read` area.

Answer:

- `whatsapp_url` (string or null, required)
- `email` (string or null, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/support-contact \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/support-contact", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/support-contact",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "whatsapp_url": "https://wa.me/966500000000",
  "email": "support@b7r.app"
}
```

## Read the legal texts

`GET /v1/legal-texts`

Every published legal text at its current version, in Arabic and English HTML. `version` is the number a consent names: opening a store takes the versions you showed. The three store texts (`store_faq`, `store_terms`, `store_privacy`) are templates: `template` is `true`, and their store-name placeholder is filled with each store’s name.

Key: A key with the `tickets:read` area.

Answer:

- `data` (array of object, required)
  - `kind` (string, required): One of `terms`, `privacy`, `creator_agreement`, `store_faq`, `store_terms`, `store_privacy`, `api_terms`.
  - `template` (boolean, required): A store text: its store-name placeholder is filled per store
  - `version` (integer, required): The version a consent names (opening a store takes it)
  - `published_at` (string or null, required)
  - `html_ar` (string, required)
  - `html_en` (string, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/legal-texts \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/legal-texts", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/legal-texts",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "data": [
    {
      "kind": "creator_agreement",
      "template": false,
      "version": 3,
      "published_at": "2026-11-01T09:00:00.000Z",
      "html_ar": "<h2>اتفاقية صانع المحتوى</h2><p>...</p>",
      "html_en": "<h2>Creator agreement</h2><p>...</p>"
    }
  ]
}
```

## Read the feedback form

`GET /v1/forms/current`

The form behind the feedback button, at the version the app shows, or `form: null` when none is set. Answer it with the `id` and `version_id` it gives.

Key: A key with the `tickets:read` area.

Answer:

- `form` (object or null, required)
  - `id` (string (uuid), required)
  - `version_id` (string (uuid), required)
  - `version_number` (integer, required)
  - `title_ar` (string, required)
  - `title_en` (string or null, required)
  - `description_ar` (string or null, required)
  - `description_en` (string or null, required)
  - `questions` (array of object, required)
    - `id` (string (uuid), required)
    - `kind` (string, required): One of `short_text`, `long_text`, `single_choice`, `multi_choice`, `rating`, `yes_no`.
    - `position` (integer, required)
    - `label_ar` (string, required)
    - `label_en` (string or null, required)
    - `help_ar` (string or null, required)
    - `help_en` (string or null, required)
    - `required` (boolean, required)
    - `options` (array of object, required)
      - `id` (string (uuid), required)
      - `label_ar` (string, required)
      - `label_en` (string or null, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/forms/current \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/forms/current", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/forms/current",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "form": {
    "id": "f0f0f0f0-0000-4000-8000-000000000001",
    "version_id": "6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d",
    "version_number": 2,
    "title_ar": "ملاحظة",
    "title_en": "Feedback",
    "description_ar": null,
    "description_en": null,
    "questions": [
      {
        "id": "7b6c5d4e-3f2a-4b1c-8d9e-0f1a2b3c4d5e",
        "kind": "rating",
        "position": 0,
        "label_ar": "ما تقييمك للتجربة؟",
        "label_en": "How was it?",
        "help_ar": null,
        "help_en": null,
        "required": true,
        "options": []
      },
      {
        "id": "8c7d6e5f-4a3b-4c2d-9e0f-1a2b3c4d5e6f",
        "kind": "long_text",
        "position": 1,
        "label_ar": "ملاحظتك",
        "label_en": "Your note",
        "help_ar": null,
        "help_en": null,
        "required": false,
        "options": []
      }
    ]
  }
}
```

## Answer the feedback form

`POST /v1/forms/answers`

`answers` maps each question’s id to its value: text, an option id, a list of option ids, a rating from 1 to 5, or `true` or `false`. The answers are your own words: they are never kept in the record of a call, and the answer holds ids only. An answer can open a support ticket, as it does in the app; then `ticket_id` and `ticket_number` name it.

Refused with `400 invalid_request`: `form_not_current` at `/body/form_id` when the form is closed or no longer behind the button, or at `/body/version_id` for a version it does not take (read the form again); `invalid_answer` at `/body/answers` when an answer does not fit its question or a required one is missing. Your keys share the app’s hourly answer limit.

Key: A key with the `tickets:write` area. Send `Idempotency-Key` and `Content-Type: application/json`.

Body:

- `form_id` (string (uuid), required)
- `version_id` (string (uuid), required)
- `answers` (object, required): By question id; your own words, never stored with the answer
- `locale` (string): One of `ar`, `en`.
- `page_path` (string): The page of your app the answer is about, a path like /orders At most 500.

Answer:

- `response_id` (string (uuid), required)
- `ticket_id` (string (uuid) or null, required)
- `ticket_number` (integer or null, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `not_found` (404), `invalid_request` (400), `idempotency_key_required` (400), `request_too_large` (413), `unsupported_media_type` (415), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504), `idempotency_mismatch` (409), `idempotency_in_flight` (409). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl -X POST https://api.b7r.app/v1/forms/answers \
  -H "Authorization: Bearer $B7R_API_KEY" \
  -H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
  -H "Content-Type: application/json" \
  -d '{
    "form_id": "f0f0f0f0-0000-4000-8000-000000000001",
    "version_id": "6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d",
    "answers": {
      "7b6c5d4e-3f2a-4b1c-8d9e-0f1a2b3c4d5e": 4,
      "8c7d6e5f-4a3b-4c2d-9e0f-1a2b3c4d5e6f": "الشحن تأخر يومًا"
    },
    "locale": "ar"
  }'
```

```javascript
const res = await fetch("https://api.b7r.app/v1/forms/answers", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "form_id": "f0f0f0f0-0000-4000-8000-000000000001",
    "version_id": "6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d",
    "answers": {
      "7b6c5d4e-3f2a-4b1c-8d9e-0f1a2b3c4d5e": 4,
      "8c7d6e5f-4a3b-4c2d-9e0f-1a2b3c4d5e6f": "الشحن تأخر يومًا"
    },
    "locale": "ar"
  }),
});
const data = await res.json();
```

```python
import os, requests, uuid

res = requests.post(
    "https://api.b7r.app/v1/forms/answers",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "form_id": "f0f0f0f0-0000-4000-8000-000000000001",
        "version_id": "6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d",
        "answers": {
            "7b6c5d4e-3f2a-4b1c-8d9e-0f1a2b3c4d5e": 4,
            "8c7d6e5f-4a3b-4c2d-9e0f-1a2b3c4d5e6f": "الشحن تأخر يومًا"
        },
        "locale": "ar"
    },
    timeout=30,
)
data = res.json()
```

Answer (201 Created):

```json
{
  "response_id": "9d8e7f6a-5b4c-4d3e-8f0a-1b2c3d4e5f6a",
  "ticket_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "ticket_number": 1043
}
```
