Quick start
Every site you add to LeadToSheet automatically gets a form endpoint URL like https://www.leadtosheet.com/f/abc123def4. Find it under your site's Forms page, then use it as your form's action attribute:
<form action="https://www.leadtosheet.com/f/abc123def4" method="POST">
<input name="email" type="email" required />
<button type="submit">Send</button>
</form>That's it - submissions show up in your dashboard and your connected Google Sheet within seconds.
Request format
The endpoint accepts three content types:
application/x-www-form-urlencoded- standard browser form submitmultipart/form-data- required when uploading filesapplication/json- for fetch / AJAX clients
For an AJAX submission:
await fetch("https://www.leadtosheet.com/f/abc123def4", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "person@example.com" }),
});Response modes
Each endpoint has a configurable response mode (set under the site's Settings → Endpoint Settings tab):
- Redirect - 302 to your
redirectUrl, or back to the page that submitted the form. Best for plain HTML forms. - Thanks page - 302 to
/f/{id}/thanks, our hosted thanks page with your custom message. - JSON - returns
{ ok: true, id }. CORS is open (Access-Control-Allow-Origin: *) for fetch / AJAX clients; allowed-domain rules still apply before a submission is accepted.
File uploads
Send multipart/form-data to upload files alongside regular fields. Files are streamed to your Google Drive folder and stored as SubmissionFile records. The download URL appears as the field value in your Google Sheet.
<form
action="https://www.leadtosheet.com/f/abc123def4"
method="POST"
enctype="multipart/form-data">
<input name="email" type="email" required />
<input name="resume" type="file" />
<button type="submit">Send</button>
</form>Spam protection
Endpoints have three layers of spam protection:
- Honeypot - every endpoint includes a hidden field (default name
_gotcha). When it's filled by a bot, the submission is silently dropped. - AI classifier - submissions are scored by an LLM-backed classifier; flagged submissions are saved to a separate spam view but don't count toward your quota.
- Allowed domains - restrict the endpoint to specific origins (see below).
Allowed domains
When set, the endpoint only accepts submissions whose Origin or Referer header matches one of your allowed domains. Subdomains are allowed automatically - if you list example.com, submissions from www.example.com and shop.example.com are accepted, but evil-example.com is not.
Leave the list empty to accept submissions from any origin. (Use the honeypot and AI classifier as your defense in that case.)
Errors
The endpoint returns standard HTTP status codes:
| Status | When you'll see it |
|---|---|
| 404 | Endpoint id does not exist or is paused. |
| 400 | Empty submission (no recognised fields). |
| 403 | Origin not in allowed-domains list, or subscription inactive / trial expired. |
| 413 | File payload exceeds the per-file or per-submission limit. |
| 415 | Unsupported file type. |
| 429 | Submission quota for the month is exhausted and the grace period has elapsed. |
| 500 | Server error (we'll see it in our logs and follow up). |
Troubleshooting
- The form posts but nothing shows up.
- Check that the endpoint isn't paused (under Settings → Endpoint Settings) and that your submission isn't being classified as spam - spam submissions land in a separate view, not your main leads table.
- I'm getting
403 forbidden host. - Either the request is coming from a domain not in your Allowed domains list, or it's missing both an
OriginandRefererheader. Submit the form from a real browser page, not a CLI tool. - The redirect after submit goes to a 404.
- Set a
redirectUrlin the endpoint settings, or switch the response mode to Show our thanks page.
Looking for more?
REST API reference
Read submissions, manage forms, and post leads programmatically.
Read API referenceNeed help?
Help Center
Step-by-step guides for setup, syncing, billing, and troubleshooting.
Browse help articles