1. Documentation
  2. Forms
  3. Submit from your code
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

Submit from your code

Keep your own form and post its answers to Specter.

Loading documentation…

Hosted page< PreviousDrafts, files and correctionsNext >

On this page

1. Read the fields2. Post the answersRefusalsFrom a browser

Keep your site's own form and post the answers to the form's public route. No key and no header — the slug is the only credential, and it can only file answers into that one form.

1. Read the fields

bash
curl https://neo-app-api-prod-836053680024.us-central1.run.app/v1/public/forms/<slug>

data holds the form's name, description, sections and fields. Each field's id is what an answer is keyed by — on a form made from a board, it is the column's id.

2. Post the answers

bash
curl -X POST https://neo-app-api-prod-836053680024.us-central1.run.app/v1/public/forms/<slug>/submissions \  -H "Content-Type: application/json" \  -d '{"answers": {"<field id>": "Acme Ltd", "<field id>": "owner@acme.example"}}'

A 201 answers a receipt:

FieldHolds
idThe submission.
submittedAtWhen it was filed.
createdRowtrue when the answers became a row on the board or page.
postSubmitWhat to do next — mode, and redirectUrl when the form redirects.
editUrlPresent when the form lets people correct what they sent.

It never answers the row itself — the person filling in the form does not get to read your board.

Refusals

StatusWhen
400An answer is missing or wrong; the message names the question.
404No published form has that slug. Unknown and unpublished read the same.

From a browser

These routes are public, so they are safe to call from a web page — unlike a board key, which must stay on a server.