AppSumoAppSumo Lifetime Deal starting at $39
Get the Deal Now!
ReferenceNo SDK required

Form endpoints

Point any HTML form at a LeadToSheet endpoint URL and the submission lands in your dashboard and Google Sheet - no JavaScript, no SDK, no backend code.

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:

contact.html
<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 submit
  • multipart/form-data - required when uploading files
  • application/json - for fetch / AJAX clients

For an AJAX submission:

submit.js
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.

upload.html
<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:

  1. Honeypot - every endpoint includes a hidden field (default name _gotcha). When it's filled by a bot, the submission is silently dropped.
  2. 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.
  3. 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:

StatusWhen you'll see it
404Endpoint id does not exist or is paused.
400Empty submission (no recognised fields).
403Origin not in allowed-domains list, or subscription inactive / trial expired.
413File payload exceeds the per-file or per-submission limit.
415Unsupported file type.
429Submission quota for the month is exhausted and the grace period has elapsed.
500Server 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 Origin and Referer header. Submit the form from a real browser page, not a CLI tool.
The redirect after submit goes to a 404.
Set a redirectUrl in 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 reference

Need help?

Help Center

Step-by-step guides for setup, syncing, billing, and troubleshooting.

Browse help articles