AppSumoAppSumo Lifetime Deal starting at $39
Get the Deal Now!

Posting Leads with the REST API

Send leads from your backend, app, or server-side automation with an API key.

When to use the API

Use the REST API when leads are created on a server, inside a private app, or in a workflow where browser form capture is not the right fit. Your code posts the lead fields to LeadToSheet using an API key for the site.

  • Good fits: backend contact forms, server-rendered checkout flows, internal tools, and custom lead import jobs.
  • Do not expose API keys in public browser JavaScript. Use the SDK, Form Endpoint, or Custom Webhook source for browser-side sends.
  • API leads still sync to Google Sheets and can trigger routes, alerts, destinations, and AI scoring.

Set it up

  1. 1

    Open Sources

    Open the site in LeadToSheet, choose Sources, then click REST API.

  2. 2

    Generate a key

    Create an API key for the site and store it in your server-side environment variables or secret manager.

  3. 3

    Post fields from your backend

    Send the lead fields and submission metadata from your server. Check the API docs for the exact request shape.

Important

API keys are secrets. Rotate the key from Sources if it is ever copied into a public client bundle, browser console, or shared document.