Get started

Leads API

Leads API

Capture form submissions from your landing page or app. POST is server-to-server only β€” call it from your backend, never from a public web page. JustDeploy stores the submission immediately and a background job emails every member of your organization within ~1 minute.

POST/organizations/:orgId/leads

Submit a new lead. Only subject is required; every other field is optional. Rate limit: 5 requests per second per organization. The response returns immediately with emailStatus: "pending"; a background job delivers the email shortly after.

Request body
{
  "subject": "New contact from landing page",
  "fullName": "Ada Lovelace",
  "email": "ada@example.com",
  "company": "Analytical Engines",
  "message": "Interested in your beta.",
  "utmSource": "twitter",
  "utmCampaign": "launch-week",
  "source": "landing-form"
}
Response
{
  "lead": {
    "id": "lead_abc123",
    "subject": "New contact from landing page",
    "fullName": "Ada Lovelace",
    "email": "ada@example.com",
    "emailStatus": "pending",
    "deliveredTo": 0,
    "createdAt": "2026-05-04T..."
  }
}
GET/organizations/:orgId/leads?limit=50&cursor=...

List leads, newest first. Use cursor for pagination β€” the response includes a nextCursor when more pages are available.

Response
{
  "leads": [
    {
      "id": "lead_abc123",
      "subject": "New contact from landing page",
      "fullName": "Ada Lovelace",
      "email": "ada@example.com",
      "emailStatus": "sent",
      "deliveredTo": 3,
      "createdAt": "2026-05-04T..."
    }
  ],
  "nextCursor": 1234
}
GET/organizations/:orgId/leads/:leadId

Get a single lead by id.