Skip to content

Leads

Leads are inbound inquiries captured from the marketing site and other sources. On creation, SM API auto-creates a contact and logs an activity.

Routes

POST /api/leads

Create a new lead. Public — no auth required (used by contact forms).

Auth: Public
Request body:

FieldTypeRequiredDescription
emailstringyesLead's email address
namestringnoFull name (defaults to email prefix)
companystringnoCompany name
phonestringnoPhone number
sourcestringnoTraffic source. Default: website
source_detailstringnoAdditional source info (e.g. page name)
project_descriptionstringnoWhat they're looking for
timelinestringnoProject timeline
budget_rangestringnoBudget range
productstringnoProduct tag (studios, mode, hub, etc.)

Behavior:

  1. Creates a leads row
  2. Auto-creates a contact if none exists for that email
  3. Links lead to contact
  4. Logs a lead_submitted activity
  5. Posts to Slack #web-leads if SLACK_BOT_TOKEN + SLACK_CHANNEL_ID are set

Response: 201 Created

json
{
  "ok": true,
  "data": {
    "id": "ld_a1b2c3d4",
    "contact_id": "c_e5f6g7h8",
    "submitted": true
  }
}

Example curl:

bash
curl -X POST https://api.sprintmode.ai/api/leads \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@acme.com",
    "name": "Jane Smith",
    "company": "Acme Corp",
    "product": "studios",
    "project_description": "Need a team to build our mobile app"
  }'

GET /api/leads

List leads with optional filters.

Auth: Required (CF Access or API key)
Query params:

ParamTypeDescription
statusstringFilter by status (new, contacted, qualified, closed)
sourcestringFilter by source
productstringFilter by product tag
searchstringFull-text search on name, email, company
limitnumberMax results. Default: 50

Response:

json
{
  "ok": true,
  "data": [
    {
      "id": "ld_a1b2c3d4",
      "name": "Jane Smith",
      "email": "jane@acme.com",
      "company": "Acme Corp",
      "source": "website",
      "product": "studios",
      "status": "new",
      "project_description": "...",
      "contact_id": "c_e5f6g7h8",
      "created_at": "2026-05-13T10:00:00Z"
    }
  ]
}

PATCH /api/leads/:id

Update a lead's status or assignment.

Auth: Required
Path params: id — lead ID
Request body (any subset):

FieldTypeDescription
statusstringnew, contacted, qualified, closed
assigned_tostringAssignee email
notesstringInternal notes
contact_idstringLink to CRM contact
company_idstringLink to CRM company

Response:

json
{ "ok": true, "data": { "id": "ld_a1b2c3d4", "updated": true } }

Sprint Mode LLC — Internal Platform Documentation