Exporturi și PDF
Exporturi CSV / JSON și linkuri de tipărit pentru răspunsuri.
- POST /exports numără răspunsurile potrivite (până la 10.000; peste, restrânge datele) și întoarce un download_url de unică folosință valabil 15 minute.
- Exportul e păstrat 24 de ore; GET /exports/{id} emite un link nou cât timp există.
- Celulele CSV sunt protejate de injecția de formule. Datele personale sunt incluse doar cu responses:pii.
- POST /responses/{id}/print_link întoarce un link de 10 minute către o pagină de tipărit (salveaz-o ca PDF); funcția de plan pdfExport.
post/responses/{response_id}/print_link
Create a printable (PDF) link for a response createPrintLink
Scope: responses:read · Plan: Pro și peste · Unealtă MCP: get_print_pdf_url · acceptă Idempotency-Key
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.
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
response_id | path | rsp_… id | da |
curl -X POST https://mform.md/api/public/v1/responses/rsp_7Tn3Wq1Lz5B/print_link \
-H "Authorization: Bearer $MFORM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Răspuns 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 și peste · Unealtă MCP: export_responses · acceptă 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.
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 |
|---|---|---|---|
form_id | form_… id | da | |
format | "csv" | "json" | nu | |
status | "completed" | "in_progress" | "abandoned" | "all" | nu | |
created_after | string (date-time) | nu | |
created_before | string (date-time) | nu |
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"}'Răspuns 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 și peste · Unealtă MCP: nu e expusă prin MCP
Exports are kept 24 hours. The download link is single-use; this call issues a fresh one while the export exists.
Parametri
| Nume | Unde | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
export_id | path | exp_… id | da |
curl https://mform.md/api/public/v1/exports/exp_8Hq2LmZ71cXa4Rt9Pq7W \
-H "Authorization: Bearer $MFORM_API_KEY"Răspuns 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"
}