Skip to main content
The webhook adds leads from your own systems: a form on your website, your CRM, an app you built. You send one HTTP request per lead, the lead enters a campaign, and the campaign starts the WhatsApp conversation. Every account type can use the webhook.

Open the webhook page

  1. Go to Integrations. The webhook is in the Automations group.
  2. Turn on its switch. The webhook gets an entry in the sidebar and its card opens its page.
  3. Open Integrations → Webhook.
The Connection section shows the Endpoint and your API key. The eye button shows the key, the copy button copies it.
Anyone with your API key can add leads to your account. Keep it on your server, never in a web page’s code.

Send a lead

Headers

Body

name and phone are what a conversation needs. Fields inside a lead_data object are read as if they were at the top level.

Which campaign gets the lead

  1. campaign_id, when you send it.
  2. Otherwise the campaign whose name matches campaign.
  3. Otherwise your default campaign. You choose it on the Campaigns page: open a campaign’s menu and pick Set as default.
The campaign must talk on WhatsApp. A campaign that talks only on Instagram cannot take a lead by phone number, and the request is refused (see Errors).

Phone numbers without a prefix

Open Profile and find Lead phone numbers. With a Default country set, a number that arrives without a prefix gets that country’s code. A number Whappy cannot read as a phone number is refused.

Code examples

Response

A 200 answer means the lead is in. data is the lead as Whappy saved it (shortened here):
The same person sent again to the same campaign (same phone) is not duplicated: the lead’s details are updated, and the answer is still 200. message says what happened:

Errors

Test it

  1. Send one request with just name and your own phone.
  2. Check the answer is 200.
  3. Open the campaign’s Leads tab and find the new lead.

Troubleshooting

The lead went to the wrong campaign. The campaign value has to be the campaign’s name, spelled the same (capitals do not matter). When no campaign matches, the lead goes to your default campaign. The lead is in, but no message arrives. The campaign has to be running, and your account needs a connected WhatsApp number. See WhatsApp. Need help? See the FAQ or contact support.