Preview links

Turn form JSON into a short link anyone can open and fill in.

Example
Apply for Product designer
Nairobi or remote, full time.
  1. Step 1, About you
  2. Step 2, Experience
  3. Step 3, Availability

Step 1 of 3 About you

About you
API
Create
curl -X POST https://fieldkit.muturi.dev/api/previews \  -H 'content-type: application/json' \  -d '{ "spec": { "title": "Contact us", "fields": [{ "type": "email" }] }, "expiresInDays": 7 }'
201 response
{  "id": "k7Qm2xPa",  "url": "https://fieldkit.muturi.dev/preview/contact-us-k7Qm2xPa",  "editToken": "Jf3w9Qx2…",  "expiresAt": "2026-10-27T09:00:00.000Z"}
Update the same link
curl -X PUT https://fieldkit.muturi.dev/api/previews/k7Qm2xPa \  -H 'content-type: application/json' \  -H 'authorization: Bearer <editToken>' \  -d '{ "spec": { "title": "Contact us", "fields": [{ "type": "email" }] }, "expiresInDays": 1 }'
Multistep forms
form.json
{  "title": "Apply for Product designer",  "steps": true,  "sections": [    { "title": "About you", "fields": [{ "type": "email" }] },    { "title": "Experience", "fields": [{ "type": "url", "name": "portfolio" }] }  ]}
API reference

Request body

spec (required)objectThe form spec, as in /llms.txt.
expiresInDaysnumber = 7Days until the link is deleted, 1 to 30.

Response

idstring8 characters.
urlstringThe link to share.
editTokenstringSend as a Bearer token to update. Shown once.
expiresAtstringISO date the link is deleted.

Errors

400{ error, errors }Each item in errors names a path, like spec.fields.1.type.
403{ error }Wrong edit token.
404{ error }Expired or unknown id.
413{ error }Over 1 MB.
429{ error }Over 20 requests a minute from one IP.
Notes
  • Answers stay in the browser. Submitting shows a test response.
  • Updating keeps the URL and restarts the expiry.
  • The preview page keeps your edit token in this browser, so Share becomes Update link.
  • GET /api/previews/<id> returns the spec, so an agent can read a link back.
  • Search engines don't index preview links.

Search docs

Find a component, input or example