Using Form Endpoint URLs
Point a standard HTML form at a LeadToSheet endpoint when you want capture without JavaScript.
When to use a form endpoint
A Form Endpoint is a generated URL for traditional HTML forms. Set your form's action attribute to the endpoint URL and submit with POST; LeadToSheet records the fields and runs the normal lead pipeline.
- Use it for static sites, simple landing pages, and environments where you prefer server-style form posts.
- It does not require the JavaScript SDK to intercept the form.
- It is separate from REST API keys, which are for server-side or backend-created leads.
Set it up
- 1
Open Sources
Open the site in LeadToSheet, choose Sources, then click Form Endpoint.
- 2
Create or copy the endpoint
Copy the generated endpoint URL for that site.
- 3
Update your form
Set the form action to the LeadToSheet URL and submit with method="POST".
- 4
Test the form
Submit a test lead and confirm it appears in LeadToSheet before sending real traffic to the page.
Pick a response mode
Form Endpoints support three response modes, each suited to a different setup. Switch between them on the endpoint's settings card.
- Thanks page (default) — the visitor lands on a LeadToSheet-hosted thanks page at /f/<endpoint-id>/thanks after submission. Good for static sites with no backend.
- Redirect — the visitor is 302-redirected to a URL you configure. Use this when you have your own thank-you page or want to pass tracking params to an analytics tool.
- JSON — the endpoint returns { ok: true, id: <submissionId> } as JSON with permissive CORS (Access-Control-Allow-Origin: *). Use this when submitting via fetch() / XHR from a JavaScript handler that wants to render its own confirmation UI.
Tip
Only POST is accepted on the endpoint URL — GET, PUT, DELETE, and PATCH all return 405 method not allowed. CORS for the OPTIONS preflight is wired automatically.
