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

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

Цены →

Экспорт и PDF

Экспорт CSV / JSON и ссылки для печати ответов.

  • POST /exports считает подходящие ответы (до 10 000; больше — сузьте даты) и возвращает одноразовый download_url на 15 минут.
  • Сам экспорт хранится 24 часа; GET /exports/{id} выдаёт новую ссылку, пока он существует.
  • Ячейки CSV защищены от внедрения формул. Персональные данные включаются только с responses:pii.
  • POST /responses/{id}/print_link возвращает ссылку на 10 минут на страницу для печати (сохраните как PDF); функция тарифа pdfExport.

post/exports

Export the responses of a form (CSV or JSON) createExport

Scope: responses:read · Тариф: Free и выше · Инструмент MCP: export_responses · поддерживает Idempotency-Key

Counts the matching responses (up to 10,000; above that narrow the dates) and returns a single-use `download_url` valid 15 minutes; the file is built when the link is opened. CSV cells are protected against formula injection. Personal data is included only if the key has `responses:pii`. 10 per hour per workspace.

Параметры

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

ИмяТипОбязательныйОписание
form_idform_… idда
format"csv" | "json"нет
status"completed" | "in_progress" | "abandoned" | "all"нет
created_afterstring (date-time)нет
created_beforestring (date-time)нет
curl -X POST https://mform.md/api/public/v1/exports \
  -H "Authorization: Bearer $MFORM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"form_id":"form_8Hq2LmZ71cX"}'

Ответ 201

{
  "id": "exp_8Hq2LmZ71cXa4Rt9Pq7W",
  "object": "export",
  "form_id": "form_8Hq2LmZ71cX",
  "format": "csv",
  "status": "ready",
  "rows": 1,
  "personal_data_included": false,
  "download_url": "https://mform.md/api/public/v1/…?t=…",
  "download_url_expires_at": "2026-11-27T10:15:00Z",
  "expires_at": "2026-11-27T10:15:00Z",
  "created_at": "2026-11-27T10:15:00Z"
}

get/exports/{export_id}

Retrieve an export getExport

Scope: responses:read · Тариф: Free и выше · Инструмент MCP: не доступна через MCP

Exports are kept 24 hours. The download link is single-use; this call issues a fresh one while the export exists.

Параметры

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

Ответ 200

{
  "id": "exp_8Hq2LmZ71cXa4Rt9Pq7W",
  "object": "export",
  "form_id": "form_8Hq2LmZ71cX",
  "format": "csv",
  "status": "ready",
  "rows": 1,
  "personal_data_included": false,
  "download_url": "https://mform.md/api/public/v1/…?t=…",
  "download_url_expires_at": "2026-11-27T10:15:00Z",
  "expires_at": "2026-11-27T10:15:00Z",
  "created_at": "2026-11-27T10:15:00Z"
}