Connect a form to a template
Authorization
ApiKeyAuth API key from Settings → API Keys.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/forms/string/docgen" \ -H "Content-Type: application/json" \ -d '{ "template_id": "string", "field_map": {} }'Disconnect a form from its template DELETE
Submissions stop generating documents. The mapping is kept, so reconnecting the same template restores it rather than making you rebuild it.
List submissions GET
Webhooks stay the primary way to receive responses; this is how you recover the ones you missed. Pass `since` on deploy, or after any outage, and backfill everything your endpoint did not acknowledge. `answers` is the same object the `form.submitted` webhook carries, so a single parser handles both paths. Newest first, cursor paginated. Submissions marked as spam are withheld unless you ask for them. **`document` is present only when the form has a template connected**, and its absence means no document will ever exist for that submission. When it is present, `status` runs `pending` → `processing` → `completed` (with a `url`) or `failed` (with an `error`). `pending` means the background job has not created the render yet, which is normal for the first few seconds after a submission — do not read it, or a missing `render_id`, as a failure.