Перейти к основному содержанию

Запуск: −50% на 3 месяца с кодом LANSARE50

Цены →

Формы

Список, создание (пустой или из шаблона), правка, публикация и ссылки.

  • GET /forms и GET /forms/{id} работают на любом тарифе (forms:read); запись требует Pro или выше (forms:write).
  • POST /forms создаёт неопубликованную форму, если publish не true. С template_id сначала идут вопросы шаблона, затем ваши.
  • PATCH /forms/{id} принимает expected_updated_at: если форма изменилась после чтения, вы получите 409 edit_conflict.
  • Ссылки для распространения содержат UTM-параметры и предзаполненные ответы, подписанные в ссылке (по умолчанию 30 дней, до 365).
  • Намеренно нет в v1: URL перенаправления, Telegram, разрешённые e-mail, свои домены, платежи, брендинг и удаление форм — используйте панель.

get/forms

List forms listForms

Scope: forms:read · Тариф: Free и выше · Инструмент MCP: list_questionnaires

Newest first. Soft-deleted forms are never listed. A key limited to some forms sees only those.

Параметры

ИмяГдеТипОбязательныйОписание
limitqueryintegerнетPage size, 1–100.
cursorquerystringнетThe `next_cursor` of the previous page. Bound to the same filters and the same key's workspace.
statusquery"published" | "unpublished" | "all"нет
project_idqueryprj_… idнет
searchquerystringнетCase-insensitive match on the title.
updated_afterquerystring (date-time)нет
curl https://mform.md/api/public/v1/forms \
  -H "Authorization: Bearer $MFORM_API_KEY"

Ответ 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 · Тариф: Pro и выше · Инструмент MCP: create_questionnaire · поддерживает Idempotency-Key

questions[].logic требует функцию conditionalLogic (Pro и выше)

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`).

Параметры

ИмяГдеТипОбязательныйОписание
Idempotency-Keyheaderstringнет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`.

Тело (JSON)

ИмяТипОбязательныйОписание
titlestringда
descriptionstring | nullнет
language"ro" | "ru" | "en"нет
project_idprj_… idнет
template_idtpl_… idнет
welcome_messagestring | nullнет
thank_you_messagestring | nullнет
requires_authbooleanнет
questionsobject[]нет
publishbooleanнет
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"}'

Ответ 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 · Тариф: Free и выше · Инструмент MCP: get_questionnaire

Параметры

ИмяГдеТипОбязательныйОписание
form_idpathform_… idда
curl https://mform.md/api/public/v1/forms/form_8Hq2LmZ71cX \
  -H "Authorization: Bearer $MFORM_API_KEY"

Ответ 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 · Тариф: Pro и выше · Инструмент 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`).

Параметры

ИмяГдеТипОбязательныйОписание
form_idpathform_… idда

Тело (JSON)

ИмяТипОбязательныйОписание
titlestringнет
descriptionstring | nullнет
language"ro" | "ru" | "en"нет
project_idprj_… idнет
welcome_messagestring | nullнет
thank_you_messagestring | nullнет
requires_authbooleanнет
free_navigationbooleanнет
expected_updated_atstring (date-time)нет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"}'

Ответ 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 · Тариф: Pro и выше · Инструмент MCP: publish_questionnaire · поддерживает Idempotency-Key

Makes the form reachable at `public_url`. Idempotent (publishing a published form returns it unchanged).

Параметры

ИмяГдеТипОбязательныйОписание
form_idpathform_… idда
Idempotency-Keyheaderstringнет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)"

Ответ 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 · Тариф: Pro и выше · Инструмент MCP: unpublish_questionnaire · поддерживает Idempotency-Key

Stops collecting responses. Existing responses are kept.

Параметры

ИмяГдеТипОбязательныйОписание
form_idpathform_… idда
Idempotency-Keyheaderstringнет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)"

Ответ 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"
}