Formulare
Listează, creează (gol sau din șablon), editează, publică și partajează formulare.
- GET /forms și GET /forms/{id} merg pe orice plan (forms:read); scrierile cer Pro sau mai mult (forms:write).
- POST /forms creează un formular nepublicat, dacă publish nu e true. Cu template_id întâi vin întrebările șablonului, apoi ale tale.
- PATCH /forms/{id} primește expected_updated_at: dacă formularul s-a schimbat de când l-ai citit primești 409 edit_conflict.
- Linkurile de partajare poartă parametri UTM și răspunsuri precompletate semnate în link (valabile implicit 30 de zile, până la 365).
- Nu sunt în v1, intenționat: URL de redirecționare, Telegram, e-mailuri permise, domenii proprii, plăți, branding și ștergerea formularelor — folosește dashboard-ul.
get/forms
List forms listForms
Scope: forms:read · Plan: Free și peste · Unealtă MCP: list_questionnaires
Newest first. Soft-deleted forms are never listed. A key limited to some forms sees only those.
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
limit | query | integer | nu | Page size, 1–100. |
cursor | query | string | nu | The `next_cursor` of the previous page. Bound to the same filters and the same key's workspace. |
status | query | "published" | "unpublished" | "all" | nu | |
project_id | query | prj_… id | nu | |
search | query | string | nu | Case-insensitive match on the title. |
updated_after | query | string (date-time) | nu |
curl https://mform.md/api/public/v1/forms \
-H "Authorization: Bearer $MFORM_API_KEY"Răspuns 200
{
"object": "list",
"data": [
{
"id": "form_8Hq2LmZ71cX",
"object": "form",
"project_id": "prj_4fK2m9QxP0a",
"title": "Customer feedback",
"description": "How was your visit?",
"slug": "example",
"status": "published",
"language": "ro",
"public_url": "https://forms.megapromoting.com/q/feedback-clienti-3a9f1c",
"edit_url": "https://example.com/webhooks/mform",
"requires_auth": false,
"free_navigation": false,
"scoring_enabled": false,
"welcome_message": "example",
"thank_you_message": "example",
"questions_count": 1,
"responses_total": 1,
"responses_completed": 1,
"questions": [
{
"id": "qst_2Jd8Kx0pQa9",
"object": "question",
"form_id": "form_8Hq2LmZ71cX",
"position": 1,
"section": "example",
"text": "How was your visit?",
"hint": "example",
"type": "short_text",
"required": false,
"options": [
"example"
],
"score_points": 1,
"logic": {},
"validation": {},
"payment": {
"amount_cents": 1,
"currency": "example",
"label": "example"
},
"allow_other": false,
"other_label": "example",
"has_answers": false,
"created_at": "2026-11-27T10:15:00Z"
}
],
"created_at": "2026-11-27T10:15:00Z",
"updated_at": "2026-11-27T10:15:00Z"
}
],
"has_more": false,
"next_cursor": "example"
}post/forms
Create a form (blank or from a template) createForm
Scope: forms:write · Plan: Pro și peste · Unealtă MCP: create_questionnaire · acceptă Idempotency-Key
questions[].logic cere funcția conditionalLogic (Pro și peste)
Creates an unpublished form unless `publish` is true. With `template_id` the questions are copied from the template; `questions` (if any) are appended after them. Counts against the plan's form limit (`plan_limit_reached`).
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
Idempotency-Key | header | string | nu | 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`. |
Corp (JSON)
| Nume | Tip | Obligatoriu | Descriere |
|---|---|---|---|
title | string | da | |
description | string | null | nu | |
language | "ro" | "ru" | "en" | nu | |
project_id | prj_… id | nu | |
template_id | tpl_… id | nu | |
welcome_message | string | null | nu | |
thank_you_message | string | null | nu | |
requires_auth | boolean | nu | |
questions | object[] | nu | |
publish | boolean | nu |
curl -X POST https://mform.md/api/public/v1/forms \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"title":"Customer feedback"}'Răspuns 201
{
"id": "form_8Hq2LmZ71cX",
"object": "form",
"project_id": "prj_4fK2m9QxP0a",
"title": "Customer feedback",
"description": "How was your visit?",
"slug": "example",
"status": "published",
"language": "ro",
"public_url": "https://forms.megapromoting.com/q/feedback-clienti-3a9f1c",
"edit_url": "https://example.com/webhooks/mform",
"requires_auth": false,
"free_navigation": false,
"scoring_enabled": false,
"welcome_message": "example",
"thank_you_message": "example",
"questions_count": 1,
"responses_total": 1,
"responses_completed": 1,
"questions": [
{
"id": "qst_2Jd8Kx0pQa9",
"object": "question",
"form_id": "form_8Hq2LmZ71cX",
"position": 1,
"section": "example",
"text": "How was your visit?",
"hint": "example",
"type": "short_text",
"required": false,
"options": [
"example"
],
"score_points": 1,
"logic": {},
"validation": {},
"payment": {
"amount_cents": 1,
"currency": "example",
"label": "example"
},
"allow_other": false,
"other_label": "example",
"has_answers": false,
"created_at": "2026-11-27T10:15:00Z"
}
],
"created_at": "2026-11-27T10:15:00Z",
"updated_at": "2026-11-27T10:15:00Z"
}get/forms/{form_id}
Retrieve a form with its questions getForm
Scope: forms:read · Plan: Free și peste · Unealtă MCP: get_questionnaire
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
form_id | path | form_… id | da |
curl https://mform.md/api/public/v1/forms/form_8Hq2LmZ71cX \
-H "Authorization: Bearer $MFORM_API_KEY"Răspuns 200
{
"id": "form_8Hq2LmZ71cX",
"object": "form",
"project_id": "prj_4fK2m9QxP0a",
"title": "Customer feedback",
"description": "How was your visit?",
"slug": "example",
"status": "published",
"language": "ro",
"public_url": "https://forms.megapromoting.com/q/feedback-clienti-3a9f1c",
"edit_url": "https://example.com/webhooks/mform",
"requires_auth": false,
"free_navigation": false,
"scoring_enabled": false,
"welcome_message": "example",
"thank_you_message": "example",
"questions_count": 1,
"responses_total": 1,
"responses_completed": 1,
"questions": [
{
"id": "qst_2Jd8Kx0pQa9",
"object": "question",
"form_id": "form_8Hq2LmZ71cX",
"position": 1,
"section": "example",
"text": "How was your visit?",
"hint": "example",
"type": "short_text",
"required": false,
"options": [
"example"
],
"score_points": 1,
"logic": {},
"validation": {},
"payment": {
"amount_cents": 1,
"currency": "example",
"label": "example"
},
"allow_other": false,
"other_label": "example",
"has_answers": false,
"created_at": "2026-11-27T10:15:00Z"
}
],
"created_at": "2026-11-27T10:15:00Z",
"updated_at": "2026-11-27T10:15:00Z"
}patch/forms/{form_id}
Update a form updateForm
Scope: forms:write · Plan: Pro și peste · Unealtă MCP: update_questionnaire
Only the fields below can be changed through the API. Redirect URL, Telegram, allowed e-mails, custom domain, payments and branding stay in the dashboard (they can send data outside mform). Send `expected_updated_at` to avoid overwriting a concurrent edit (`409 edit_conflict`).
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
form_id | path | form_… id | da |
Corp (JSON)
| Nume | Tip | Obligatoriu | Descriere |
|---|---|---|---|
title | string | nu | |
description | string | null | nu | |
language | "ro" | "ru" | "en" | nu | |
project_id | prj_… id | nu | |
welcome_message | string | null | nu | |
thank_you_message | string | null | nu | |
requires_auth | boolean | nu | |
free_navigation | boolean | nu | |
expected_updated_at | string (date-time) | nu | The form's `updated_at` you last read. If the form changed since, the call fails with `409 edit_conflict`. |
curl -X PATCH https://mform.md/api/public/v1/forms/form_8Hq2LmZ71cX \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Customer feedback"}'Răspuns 200
{
"id": "form_8Hq2LmZ71cX",
"object": "form",
"project_id": "prj_4fK2m9QxP0a",
"title": "Customer feedback",
"description": "How was your visit?",
"slug": "example",
"status": "published",
"language": "ro",
"public_url": "https://forms.megapromoting.com/q/feedback-clienti-3a9f1c",
"edit_url": "https://example.com/webhooks/mform",
"requires_auth": false,
"free_navigation": false,
"scoring_enabled": false,
"welcome_message": "example",
"thank_you_message": "example",
"questions_count": 1,
"responses_total": 1,
"responses_completed": 1,
"questions": [
{
"id": "qst_2Jd8Kx0pQa9",
"object": "question",
"form_id": "form_8Hq2LmZ71cX",
"position": 1,
"section": "example",
"text": "How was your visit?",
"hint": "example",
"type": "short_text",
"required": false,
"options": [
"example"
],
"score_points": 1,
"logic": {},
"validation": {},
"payment": {
"amount_cents": 1,
"currency": "example",
"label": "example"
},
"allow_other": false,
"other_label": "example",
"has_answers": false,
"created_at": "2026-11-27T10:15:00Z"
}
],
"created_at": "2026-11-27T10:15:00Z",
"updated_at": "2026-11-27T10:15:00Z"
}post/forms/{form_id}/publish
Publish a form publishForm
Scope: forms:write · Plan: Pro și peste · Unealtă MCP: publish_questionnaire · acceptă Idempotency-Key
Makes the form reachable at `public_url`. Idempotent (publishing a published form returns it unchanged).
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
form_id | path | form_… id | da | |
Idempotency-Key | header | string | nu | 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`. |
curl -X POST https://mform.md/api/public/v1/forms/form_8Hq2LmZ71cX/publish \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Răspuns 200
{
"id": "form_8Hq2LmZ71cX",
"object": "form",
"project_id": "prj_4fK2m9QxP0a",
"title": "Customer feedback",
"description": "How was your visit?",
"slug": "example",
"status": "published",
"language": "ro",
"public_url": "https://forms.megapromoting.com/q/feedback-clienti-3a9f1c",
"edit_url": "https://example.com/webhooks/mform",
"requires_auth": false,
"free_navigation": false,
"scoring_enabled": false,
"welcome_message": "example",
"thank_you_message": "example",
"questions_count": 1,
"responses_total": 1,
"responses_completed": 1,
"questions": [
{
"id": "qst_2Jd8Kx0pQa9",
"object": "question",
"form_id": "form_8Hq2LmZ71cX",
"position": 1,
"section": "example",
"text": "How was your visit?",
"hint": "example",
"type": "short_text",
"required": false,
"options": [
"example"
],
"score_points": 1,
"logic": {},
"validation": {},
"payment": {
"amount_cents": 1,
"currency": "example",
"label": "example"
},
"allow_other": false,
"other_label": "example",
"has_answers": false,
"created_at": "2026-11-27T10:15:00Z"
}
],
"created_at": "2026-11-27T10:15:00Z",
"updated_at": "2026-11-27T10:15:00Z"
}post/forms/{form_id}/unpublish
Unpublish a form unpublishForm
Scope: forms:write · Plan: Pro și peste · Unealtă MCP: unpublish_questionnaire · acceptă Idempotency-Key
Stops collecting responses. Existing responses are kept.
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
form_id | path | form_… id | da | |
Idempotency-Key | header | string | nu | 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`. |
curl -X POST https://mform.md/api/public/v1/forms/form_8Hq2LmZ71cX/unpublish \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Răspuns 200
{
"id": "form_8Hq2LmZ71cX",
"object": "form",
"project_id": "prj_4fK2m9QxP0a",
"title": "Customer feedback",
"description": "How was your visit?",
"slug": "example",
"status": "published",
"language": "ro",
"public_url": "https://forms.megapromoting.com/q/feedback-clienti-3a9f1c",
"edit_url": "https://example.com/webhooks/mform",
"requires_auth": false,
"free_navigation": false,
"scoring_enabled": false,
"welcome_message": "example",
"thank_you_message": "example",
"questions_count": 1,
"responses_total": 1,
"responses_completed": 1,
"questions": [
{
"id": "qst_2Jd8Kx0pQa9",
"object": "question",
"form_id": "form_8Hq2LmZ71cX",
"position": 1,
"section": "example",
"text": "How was your visit?",
"hint": "example",
"type": "short_text",
"required": false,
"options": [
"example"
],
"score_points": 1,
"logic": {},
"validation": {},
"payment": {
"amount_cents": 1,
"currency": "example",
"label": "example"
},
"allow_other": false,
"other_label": "example",
"has_answers": false,
"created_at": "2026-11-27T10:15:00Z"
}
],
"created_at": "2026-11-27T10:15:00Z",
"updated_at": "2026-11-27T10:15:00Z"
}