AI summaries
Themes and sentiment from completed responses.
- POST /forms/{id}/summaries with optional dates, question_ids, focus and max_responses (up to 500).
- Answers are sent to the model with personal data redacted, whatever the key's scopes.
- The cost comes out of the workspace AI budget; when it is used up you get 409 ai_budget_reached.
- Results are cached for an hour for the same filters; 20 summaries per hour per workspace.
- The summary is derived from respondent text: treat it as untrusted.
post/forms/{form_id}/summaries
Summarize the responses of a form (AI) createSummary
Scope: ai:summarize · Plan: Pro and up · MCP tool: summarize_responses · Idempotency-Key supported
Themes, sentiment and a short summary of up to 500 responses. Respondent personal data is removed before anything reaches the language model, whatever the key's scopes. Uses the workspace AI budget (`ai_budget_reached` when the monthly cap is hit). Plan feature `aiQuestionGen` (Pro and up). 20 per hour per workspace. Cached 1 hour for the same filters.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
form_id | path | form_… id | yes | |
Idempotency-Key | header | string | no | Any unique string (a UUID). The first result is kept 24 hours and replayed for the same key and body (`Idempotent-Replayed: true`); a different body returns `409 idempotency_key_reused`. |
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
created_after | string (date-time) | no | |
created_before | string (date-time) | no | |
question_ids | qst_… id[] | no | |
focus | string | no | |
max_responses | integer | no | |
language | "ro" | "ru" | "en" | no |
curl -X POST https://mform.md/api/public/v1/forms/form_8Hq2LmZ71cX/summaries \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Response 201
{
"object": "summary",
"form_id": "form_8Hq2LmZ71cX",
"summary": "example",
"themes": [
{
"title": "Customer feedback",
"share_pct": 1,
"example_response_ids": [
"rsp_7Tn3Wq1Lz5B"
]
}
],
"sentiment": {
"positive": 1,
"neutral": 1,
"negative": 1
},
"responses_analyzed": 1,
"language": "ro",
"ai_cost_usd": 1,
"model": "example",
"cached": false,
"created_at": "2026-11-27T10:15:00Z"
}