1. Documentation
  2. Forms
  3. Drafts, files and corrections
Open Specter
  • Introduction
  • Quickstart
  • Authentication
  • Errors
  • Rate limits
  • Best practices
  • Overview
  • Best practices
  • Create a key
  • Read and write
  • Overview
  • Best practices
  • Hosted page
  • Submit from your code
  • Drafts, files and corrections

Drafts, files and corrections

Long forms filled over days, attachments, and fixing a sent answer.

Loading documentation…

Submit from your code< Previous

On this page

DraftsFilesCorrections

The hosted page does all of this for you. These routes are for your own front end when a form is too long for one sitting.

Drafts

A draft is a scratchpad its holder owns. It validates nothing, tells the workspace nothing until it is filed, and expires after 30 days.

RouteDoes
POST /v1/public/forms/<slug>/draftsStart one → {draft, url}; keep the short key
GET /v1/public/forms/drafts/<key>The questions and what has been typed so far
PUT /v1/public/forms/drafts/<key>Replace the saved answers — the whole form, not a merge
POST /v1/public/forms/drafts/<key>/submitFile it — the same checks as a direct submit

A draft files once: a second submit is 409. An expired draft is 410, not 404, so you can tell someone their link ran out rather than that it never existed.

Files

A file question is answered by declaring the file on the draft, then sending the bytes straight to storage:

bash
curl -X POST https://neo-app-api-prod-836053680024.us-central1.run.app/v1/public/forms/drafts/<key>/files \  -H "Content-Type: application/json" \  -d '{"fieldId": "<file field id>", "name": "June statement.pdf", "contentType": "application/pdf", "sizeBytes": 291044}'

The answer carries a signed upload URL — PUT the file to it. When the draft is filed, its files are pinned to the record it made. The file question decides what kind of document it is, not the upload.

Corrections

When a form allows it, the submit receipt carries an editUrl. Its token opens that one submission:

RouteDoes
GET /v1/public/forms/submissions/edit/<token>The answers that currently stand
PUT /v1/public/forms/submissions/edit/<token>File a correction