API and webhooks
For agencies and teams that run research from their own systems: order a survey, follow fielding, fetch the results, and hear about events without polling.
Create a keyKeys
Create a key in your account, under “API and webhooks”. We show it once — store it somewhere safe. Send it in the Authorization header of every request. A key acts as the person who created it, in their workspace. A revoked key stops working at once.
curl https://fastsurvey.uz/api/v1/studies \
-H "Authorization: Bearer fs_live_…"Address and format
Every request goes over https to the address below; request and response bodies are JSON. A successful response carries a data field, an error an error field with a code.
https://fastsurvey.uz/api/v1
Endpoints
GET
/studiesThe workspace's studies, newest first. Parameters: status — only those with this status; limit — how many to return, up to 200 (50 by default).
POST
/studiesOrder a study. It goes to review like one ordered in the app, and is paid for in the app.
GET
/studies/{id}One study: its status, how many completes are in, its cost, and its link in the app.
GET
/studies/{id}/resultsThe results, as on the Results tab: for every question, the spread of answers or the numbers, and open answers. The parameters are the tab's own: split — the breakdown, f — a filter (repeatable), cmp=1 with b — compare two segments, w=1 — weighted. To fetch a view set up in the app, copy the parameters from the page's address.
curl "https://fastsurvey.uz/api/v1/studies/{id}/results?split=gender&w=1" \
-H "Authorization: Bearer fs_live_…"Ordering a study
A quick survey — product: "quick". Title, language, up to 4 questions with answer options, audience and sample size — the same fields as the wizard on the site.
An audience for your own questionnaire — product: "full". The questionnaire's formId from your account, language, audience and sample; optionally quotas, more languages (alsoIn), a follow-up to the people who completed one of your studies (recontactOf) and a soft launch (softLaunch).
If the workspace has no name yet and the key is its owner's, also send company — the organisation's name, as with a first order on the site. Only the owner names the workspace: an editor's key orders without it.
curl -X POST https://fastsurvey.uz/api/v1/studies \
-H "Authorization: Bearer fs_live_…" \
-H "Content-Type: application/json" \
-d '{
"product": "quick",
"title": "Кофе по утрам",
"language": "ru",
"questions": [
{
"text": "Как часто вы пьёте кофе?",
"type": "single",
"options": ["Каждый день", "Несколько раз в неделю", "Реже", "Не пью"]
}
],
"targeting": { "genders": [], "ageMin": 18, "ageMax": 34, "regions": ["UZ-TK"] },
"sample": 200
}'Statuses
in_review— in reviewawaiting_payment— approved, awaiting paymentrejected— rejected, the reason is in reviewNoteactive— collectingpaused— pausedcompleted— completedcancelled— cancelled
Errors
400 invalid_json— the body is not JSON or is larger than 10 MB401 unauthorized— the key is missing, wrong or revoked403 view_only— the key's maker is a viewer in this workspace: reading works, ordering does not404 not_found— no such study or questionnaire in the workspace422 invalid— the order's fields did not pass; fields lists which422 company— the organisation's name is needed422 product— product must be quick or full422 not_panel_ready · language · placeholders · recontact— for your own questionnaire: not_panel_ready — it cannot run on the panel; language — no translation into the language chosen; placeholders — [square brackets] are left in it; recontact — the sample is larger than those who can be asked again429 rate_limited— more than 300 requests in 5 minutes from one key
Webhooks
Add an address under “API and webhooks” and choose the events. When a study launches, reaches half its sample or completes, we POST JSON to the address: the event's id, its type, and the study as the API returns it.
study.launched— the study is paid for and launchedstudy.half— half the sample is instudy.completed— fielding has finished
{
"id": "5f0c…",
"event": "study.half",
"createdAt": "2026-10-08T09:30:00.000Z",
"data": {
"study": {
"id": "8d2e…",
"title": "Кофе по утрам",
"status": "active",
"sample": 200,
"completes": 100,
"url": "https://fastsurvey.uz/ru/studies/8d2e…"
}
}
}Signature
Every request is signed with the address's secret, shown when the address is added. The FastSurvey-Signature header carries the time it was sent, t, and the signature v1 — the HMAC-SHA256 of “t.request body”, in hex. Compute it yourself and compare, and refuse requests older than 5 minutes: then a captured request cannot be replayed.
FastSurvey-Event: study.half
FastSurvey-Delivery: 5f0c…
FastSurvey-Signature: t=1791451800,v1=3b9f…import { createHmac, timingSafeEqual } from "node:crypto";
// body: the request's raw body, as received — not parsed and re-serialised.
function verify(secret, header, body) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;
const expected = createHmac("sha256", secret).update(`${t}.${body}`).digest();
const given = Buffer.from(parts.v1 ?? "", "hex");
return given.length === expected.length && timingSafeEqual(given, expected);
}Delivery and retries
Answer with any 2xx code within 10 seconds. Otherwise we retry after 1 minute, 5 minutes, 30 minutes, 2 hours, 12 hours and 24 hours, then mark the event as not delivered. An event may arrive twice — check its id. The history of recent events is in your account.