Docs · Developers

Lead intake webhook

Turn on lead intake per list (list settings → Lead intake (API)) to get its secret key. See Lead intake for the setup in the app.

Request

POST https://app.spamuraidialer.com/hooks/leads/<key>
POST https://app.spamuraidialer.com/hooks/leads         (with  Authorization: Bearer <key>)

Body: JSON or a regular form post (application/x-www-form-urlencoded), up to 64 KB. No API key needed: the intake key is the secret.

curl -X POST https://app.spamuraidialer.com/hooks/leads/<key> \
  -H "Content-Type: application/json" \
  -d '{"first_name":"Sanne","last_name":"de Vries","phone":"06 1234 5678",
       "email":"sanne@example.com","company":"Acme","message":"Wants a demo",
       "utm_campaign":"winter"}'

Fields

Names are matched loosely: case, spaces, _ and - don’t matter. Only a phone number is required.

Lead fieldAccepted names
namename, full_name, contact_name, your_name, naam · or first_name + last_name (voornaam, achternaam)
phonephone, phone_number, telephone, tel, mobile, cell, whatsapp, telefoon, telefoonnummer, mobiel
emailemail, email_address, mail, emailadres
companycompany, company_name, business, organization, bedrijf, bedrijfsnaam
titletitle, job_title, position, role, functie
notesmessage, notes, comments, remarks, bericht, opmerking, vraag
phone typephone_type: mobile, company or direct. Shows as an icon on the lead.
lead idlead_id: the leadId an earlier post returned. Gives that lead a better number instead of adding a new lead (e.g. the mobile after the company’s main number).

Any other field is added to the lead’s notes as “Label: value”. Fields starting with _ are instructions, not lead data:

  • _redirect: for HTML forms, the page to send people to afterwards (otherwise a simple thank-you page).
  • _gotcha: a hidden honeypot. When it’s filled in (by a bot), the post is ignored.

What happens

  • The number is checked and fixed like every number (see Number checks). National numbers get the space’s default country code.
  • The same number again in that list updates the existing lead instead of adding a duplicate.
  • Numbers on the do-not-call list are skipped.
  • With Call new leads first on, the lead goes to the front of the queue. Running dialer sessions pick it up within 20 seconds, phones with notifications on get a push, and an alert follows if nobody calls within 5 minutes.

Responses

201{"ok":true,"status":"created","leadId":"…"}
200status updated (same number, or a new number for lead_id), skipped (do-not-call) or ignored (honeypot)
400No valid phone number; error says why
404Unknown or replaced URL
429More than 60 leads a minute for this URL

HTML form posts get a page instead of JSON (or the _redirect).