Developer API

Developer API

Use bearer API keys to read forms and leads from a Form2Lead workspace.

Manage API keys
API keys
Workspace owners and admins can create keys in Account > Workspace > API keys. The full secret is shown once.

Base URL

https://form2lead.vercel.app

Authentication

Send the key in the Authorization header on every request.

Authorization: Bearer f2l_xxxxx
Endpoints

GET /api/v1/forms

Returns forms in the workspace attached to the API key.

Query parameters: page, page_size

curl "https://form2lead.vercel.app/api/v1/forms?page=1&page_size=25" \
  -H "Authorization: Bearer f2l_xxxxx"

GET /api/v1/leads

Returns leads for one form when that form belongs to the key workspace.

Query parameters: form_id, page, page_size

curl "https://form2lead.vercel.app/api/v1/leads?form_id=FORM_ID&page=1&page_size=25" \
  -H "Authorization: Bearer f2l_xxxxx"
JavaScript SDK
The workspace package wraps the same HTTP API and throws typed errors.
import { createForm2LeadClient } from "@workspace/form2lead-sdk";

const client = createForm2LeadClient({
  apiKey: "f2l_xxxxx",
});

const forms = await client.forms.list({ pageSize: 25 });
const leads = await client.leads.list({
  formId: "FORM_ID",
  pageSize: 25,
});
Quotas
Free cannot use the public API. Pro allows 10,000 requests per month and 60 per minute. Agency allows 100,000 per month and 300 per minute.

Request cost

Each request costs at least 1 unit. Larger pages cost ceil(page_size / 25).

X-Form2Lead-RateLimit-Remaining: 9999
Error codes
Errors return JSON with error.code and an HTTP status.
api_key_required, api_key_invalid, scope_required, plan_required, quota_exceeded, rate_limit_exceeded
    Form2Lead — From bio click to real contact