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.

Note

Building an AI agent rather than a backend service? The MCP server in the Developer API category exposes the same reads and writes through a tool-based interface — same API key, same scopes.

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.

Note

Every key starts with the lts_ prefix, so you can recognise a LeadToSheet token at a glance in your server logs.

Send a request

Once you have a key, POST your lead JSON to the submissions endpoint with the key as a bearer token.

  • URL — https://www.leadtosheet.com/api/v1/submissions
  • Method — POST
  • Headers — Authorization: Bearer lts_<your-key> plus Content-Type: application/json
  • Body — { "fields": { "Email": "alice@example.com", "Full name": "Alice" } }, with any optional submission metadata alongside fields

Tip

The full request and response schema lives at /docs/api, and the OpenAPI 3.1 spec at /api/v1/openapi.json is ready to drop into Postman or Stoplight. The same key works for the MCP server at /api/mcp — scopes apply consistently across REST and MCP.