# formto docs (full text) > Every page of https://formto.io/docs, in order. Code samples are verbatim. --- # What formto does formto is the backend for the forms on your website. You keep your own HTML; formto receives each response, checks it, stores it, emails it to you and sends it wherever you work. - **One endpoint per form.** Your form posts to `https://api.formto.io/f/
`. No server code, no database. - **Spam stays out.** A hidden honeypot field, allowed origins and per-project rate limits stop bots before they reach your inbox. - **Responses go where you work.** Email is on every plan; webhooks, Slack, Discord and Zapier are on paid plans. - **Agents can set it up for you.** Claude Code, Cursor and ChatGPT connect over OAuth, and the `formto` CLI signs in through your browser. Nobody pastes a secret into chat. ## Where to go next - [Quickstart](/docs/start/quickstart): a working form in five steps. - [Add a form to your site](/docs/build): the generated HTML and how to restyle it. - [Read responses](/docs/collect): the dashboard, the CLI and the API. - [Send responses somewhere](/docs/connect): webhooks, chat tools and AI agents. - [API reference](/docs/reference): tokens, routes and the OpenAPI spec. --- # Quickstart A form that emails you every response, from an empty terminal. The commands use `curl` and `node`; the CLI does the same in fewer keystrokes. ## 1. Get a token Sign in from your terminal. It prints a code; approve it at formto.io/connect in the browser where you are signed in. ```console npx -y https://formto.io/dl/cli-latest.tgz login ``` The token is saved to `~/.formto/credentials.json`. For scripts, create one under [API keys](/tokens) instead and export it as `FORMTO_TOKEN`. Never paste a token into a chat. ## 2. Create a form ```sh curl -fsS https://api.formto.io/v2/forms \ -H "Authorization: Bearer $FORMTO_TOKEN" \ -H 'content-type: application/json' \ -d '{"name":"Contact"}' > form.json node -e 'const f = require("./form.json"); console.log("Form " + f.id + " posts to https://api.formto.io/f/" + f.publicId)' ``` Responses are emailed to the workspace owner. The form starts with no field rules, so it accepts whatever your page sends. ## 3. Add it to your page Paste this into your HTML and replace `YOUR_FORM_ID` with the `publicId` from step 2. The hidden `_gotcha` field catches bots; keep it. ```html
``` ## 4. Send a test response ```sh curl -fsS "https://api.formto.io/f/$(node -p 'require("./form.json").publicId')" \ -H 'accept: application/json' \ -d name=Ada -d email=ada@example.com -d message='Hello from the quickstart' ``` The answer is `{"success":true,...}`, and the owner gets an email. ## 5. Read your responses ```sh curl -fsS "https://api.formto.io/v2/submissions?formId=$(node -p 'require("./form.json").id')" \ -H "Authorization: Bearer $FORMTO_TOKEN" ``` They are also in the dashboard under [Responses](/responses). Next: [restyle the form](/docs/build) or [send responses to Slack or a webhook](/docs/connect). --- # Add a form to your site Any HTML form works: point its `action` at your form's endpoint and use `method="post"`. The fastest way to a form that matches your fields is the generator, which the CLI, the MCP tools and the dashboard all use. ## Generate it ```console npx -y https://formto.io/dl/cli-latest.tgz init --yes --name "Quote request" ``` `init` creates the form, sets its fields, writes `formto-quote-request.html` and allows submissions only from the site in `package.json` `homepage`. Agents call `formto_generate_form_code` for the same HTML or a React component. ## What the generated form contains - A `