Exports and PDF
CSV / JSON exports and printable response links.
- POST /exports counts the matching responses (up to 10,000; narrow the dates above that) and returns a single-use download_url valid 15 minutes.
- The export itself is kept 24 hours; GET /exports/{id} issues a fresh link while it exists.
- CSV cells are protected against formula injection. Personal data is included only with responses:pii.
- POST /responses/{id}/print_link returns a 10-minute link to a printable page (save it as PDF); plan feature pdfExport.
post/responses/{response_id}/print_link
Create a printable (PDF) link for a response createPrintLink
Scope: responses:read · Plan: Pro and up · MCP tool: get_print_pdf_url · Idempotency-Key supported
A signed URL to the print view, valid 10 minutes, bound to this response and to the personal-data level of the key. Open it and save as PDF. Plan feature `pdfExport`. 30 per hour.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
response_id | path | rsp_… id | yes |
curl -X POST https://mform.md/api/public/v1/responses/rsp_7Tn3Wq1Lz5B/print_link \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Response 201
{
"object": "print_link",
"response_id": "rsp_7Tn3Wq1Lz5B",
"url": "https://example.com/webhooks/mform",
"personal_data_included": false,
"expires_at": "2026-11-27T10:15:00Z"
}post/exports
Export the responses of a form (CSV or JSON) createExport
Scope: responses:read · Plan: Free and up · MCP tool: export_responses · Idempotency-Key supported
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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
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 |
|---|---|---|---|
form_id | form_… id | yes | |
format | "csv" | "json" | no | |
status | "completed" | "in_progress" | "abandoned" | "all" | no | |
created_after | string (date-time) | no | |
created_before | string (date-time) | no |
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"}'Response 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 · Plan: Free and up · MCP tool: not exposed over MCP
Exports are kept 24 hours. The download link is single-use; this call issues a fresh one while the export exists.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
export_id | path | exp_… id | yes |
curl https://mform.md/api/public/v1/exports/exp_8Hq2LmZ71cXa4Rt9Pq7W \
-H "Authorization: Bearer $MFORM_API_KEY"Response 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"
}