Base URL and authentication
X-API-Key header on every request:
401:
Check the key
POST /zap
Answers 200 with an empty body (null) when the key is valid, 401 otherwise.
Event subscriptions
Subscribe
POST /zap/triggers
Response
201:
id to unsubscribe.
List subscriptions
GET /zap/triggers returns the account’s active subscriptions (up to 100), Zapier’s and Make’s together. Each has _id, url, zap_type, name, campaign_id (the campaignName you sent), metadata (source: zapier or make, and hours), created_at and revoked.
Unsubscribe
DELETE /zap/triggers/{id}, with the id returned on subscribe.DELETE /zap/triggerswith the body{ "targetUrl": "...", "zap_type": "CLOSE" }.
200 with {"status": "success", "message": "Trigger removed"}, or with {"status": "already_removed", ...} when nothing matched.
Sample payload
GET /zap/sample/{name} returns a list with one sample event payload, to map fields before a real event happens. Every name returns the same sample, and the sample has no campaign_name.
Older per-event addresses
POST /zap/url/{name} with { "targetUrl": "...", "hours": 24 } stores one address for close, appointment or dead (hours for dead only), and DELETE /zap/url/{name} removes it. Whappy still sends events to these addresses, alongside the subscriptions. Use /zap/triggers for anything new: it supports several URLs per event and SEND_DATA.
Event payload
When the event happens, Whappy sends aPOST with this JSON body to every subscribed URL. No extra headers are added beyond Content-Type: application/json. Any 2xx answer counts as delivered; a URL that fails stays subscribed.
Parse the
*_json fields before use:
Create a lead
POST /lead
The Create Lead action on Zapier and Make sends these fields. This is the same endpoint as the Webhook integration, which lists every field it accepts.
Response
200:
message says what happened:
Lead created successfully: a new lead.Lead already exists; details merged: the same person was already in that campaign. Whappy keeps one lead and adds the new details.Lead already exists; details merged and campaign restart requested: as above, and the conversation starts over because the campaign has Restart the campaign for a lead that comes back on.

