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 field | Accepted names |
|---|---|
| name | name, full_name, contact_name, your_name, naam · or first_name + last_name (voornaam, achternaam) |
| phone | phone, phone_number, telephone, tel, mobile, cell, whatsapp, telefoon, telefoonnummer, mobiel |
email, email_address, mail, emailadres | |
| company | company, company_name, business, organization, bedrijf, bedrijfsnaam |
| title | title, job_title, position, role, functie |
| notes | message, notes, comments, remarks, bericht, opmerking, vraag |
| phone type | phone_type: mobile, company or direct. Shows as an icon on the lead. |
| lead id | lead_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":"…"} |
200 | status updated (same number, or a new number for lead_id), skipped (do-not-call) or ignored (honeypot) |
400 | No valid phone number; error says why |
404 | Unknown or replaced URL |
429 | More than 60 leads a minute for this URL |
HTML form posts get a page instead of JSON (or the _redirect).