API reference · Onboarding
Generate question set
post
/onboarding/questions| Authentication | Customer token (Bearer) |
|---|---|
| Access | Free user · Pro user Customer token (Bearer) — free and paid users |
(Re)builds the question set from templates: per-stage counts from the plan (free 1/2/2/4/1, paid 3/4/4/10/4) split across active cells. Old questions are deactivated, never deleted. The new set waits for approval.
Responses
200 — QuestionsResponse
| Field | Type | Description |
|---|---|---|
questions* | object[] | |
questions[].id* | integer | Unique ID. |
questions[].stage* | string | Buying stage of the question. |
questions[].type* | string | |
questions[].text* | string | |
questions[].language* | string | |
questions[].cell_id* | integer | null | the question's own language: lang/dir on its text (as in the reports) |
questions[].position* | integer | |
questions[].edited* | boolean | |
stage_counts* | object | Number of questions per buying stage. |
stage_counts.problem | integer | |
stage_counts.solution | integer | |
stage_counts.criteria | integer | |
stage_counts.selection | integer | |
stage_counts.validation | integer | |
changes* | object | |
changes.used* | integer | |
changes.limit* | integer | |
changes.remaining* | any | |
changes.month* | any | |
changes.resets_at* | string | |
changes.counting* | boolean | |
language* | string | |
engine_label* | string |
json
{
"questions": [
{
"id": 345,
"stage": "problem",
"type": "unbranded",
"text": "نشانههای اینکه یک شرکت کوچک به نرمافزار حسابداری ابری نیاز دارد چیست؟",
"language": "fa",
"cell_id": 9,
"position": 1,
"edited": true
},
{
"id": 346,
"stage": "solution",
"type": "unbranded",
"text": "انواع نرمافزار حسابداری ابری چیست و هر کدام برای چه شرکتی مناسب است؟",
"language": "fa",
"cell_id": 9,
"position": 2,
"edited": false
}
],
"stage_counts": {
"problem": 1,
"solution": 2,
"criteria": 2,
"selection": 4,
"validation": 1
},
"changes": {
"used": 0,
"limit": 2,
"remaining": 2,
"month": "1405-09",
"resets_at": "2026-12-21T20:30:00Z",
"counting": false
},
"language": "fa",
"engine_label": "ChatGPT"
}
401 — Missing/invalid token, or a token of the wrong owner (admin token on a user route or vice versa): {"message":"…","code":"unauthenticated"} (message in the request language)
| Field | Type |
|---|---|
message* | string |
code | string |
json
{
"message": "Please sign in to continue; your session has ended or is not valid.",
"code": "unauthenticated"
}
422 — Validation failed (questions — no product/customer yet)
| Field | Type |
|---|---|
message* | string |
errors* | object |
json
{
"message": "",
"errors": {
"email": [
"ایمیل معتبر نیست."
]
}
}
curl example
bash
curl -X POST 'http://127.0.0.1:8010/api/onboarding/questions' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"