# Submit from your code

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:

| Field | Holds |
| --- | --- |
| `id` | The submission. |
| `submittedAt` | When it was filed. |
| `createdRow` | `true` when the answers became a row on the board or page. |
| `postSubmit` | What to do next — `mode`, and `redirectUrl` when the form redirects. |
| `editUrl` | Present 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

| Status | When |
| --- | --- |
| `400` | An answer is missing or wrong; the message names the question. |
| `404` | No 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](/boards/create-a-key), which must stay on a server.
