Add leads to a Whappy campaign from your own systems with one HTTP request
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.
The WhatsApp number. Write it with its international prefix (+39…), or set a default country (see below).
email
Optional.
campaign or campaign_id
Optional. The campaign’s name, or its id. Leave both out to use your default campaign.
tags
Optional. A list, or text separated by commas. The tags are saved on the lead.
language
Optional. The lead’s language, as a code (es, es-ES) or an English name (Spanish). Used when Form or page language is on under Language of new leads (in Profile). An unknown value is ignored.
any other field
Saved on the lead, like budget above. The AI reads it, and WhatsApp templates can use it as {{budget}}.
name and phone are what a conversation needs. Fields inside a lead_data object are read as if they were at the top level.
Otherwise the campaign whose name matches campaign.
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).
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.
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:
message
Meaning
Lead created successfully
A new lead.
Lead already exists; details merged
The lead was already there; its details were updated.
Lead already exists; details merged and campaign restart requested
As above, and the campaign starts over with this lead. This happens only when the campaign’s Restart the campaign for a lead that comes back option is on and the conversation had already started.
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.
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"Whappy Documentation","description":"AI-driven WhatsApp automation for lead qualification and appointment setting","colors":{"primary":"#0095FF","light":"#0095FF","dark":"#0095FF"},"logo":{"light":"https://mintcdn.com/whappy/kglCbESBYdWSPkHx/logo/light.png?fit=max\u0026auto=format\u0026n=kglCbESBYdWSPkHx\u0026q=85\u0026s=3b6821afdd1e7b66405bdfa84822d7f0","dark":"https://mintcdn.com/whappy/kglCbESBYdWSPkHx/logo/dark.png?fit=max\u0026auto=format\u0026n=kglCbESBYdWSPkHx\u0026q=85\u0026s=34f79c8a138bc7969ee2a22aa9c9f5b1"},"favicon":"https://mintcdn.com/whappy/kglCbESBYdWSPkHx/favicon.svg?fit=max\u0026auto=format\u0026n=kglCbESBYdWSPkHx\u0026q=85\u0026s=29a6fa2ce3660829b013e2a7188929d2","appearance":{"default":"light"},"background":{"decoration":"windows","color":{"dark":"#0a0814"}},"navbar":{"links":[{"href":"https://app.whappy.ai","label":"Log in"},{"href":"mailto:team@whappy.ai","label":"Support"}],"primary":{"type":"button","label":"Try Now","href":"https://whappy.ai/signup"}},"footer":{"socials":{"x":"https://x.com/whappy","github":"https://github.com/whappy-ai","linkedin":"https://linkedin.com/company/whappy-ai"}},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":"introduction"},{"language":"it","href":"it/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"whappy","hasAudioNarration":false,"actualSubdomain":"whappy","customDomains":["docs.whappy.ai"],"gitSource":{"type":"github","owner":"whappyai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad4e149904c2e51ab1bed3f","collectionId":"1230cdac-a9f6-43ee-aefe-b7b6daabd5ac","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad4e149904c2e51ab1bed3f"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ad4e149904c2e51ab1bed3f","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"en","tag":"Integrations","count":13},{"language":"it","tag":"Integrazioni","count":13},{"language":"en","tag":"Campaign","count":9},{"language":"it","tag":"Campagna","count":9},{"language":"en","tag":"Leads","count":8},{"language":"it","tag":"Lead","count":8},{"language":"en","tag":"Autopilot","count":7},{"language":"it","tag":"Autopilot","count":7},{"language":"en","tag":"Overview","count":6},{"language":"it","tag":"Panoramica","count":6},{"language":"en","tag":"Campaign Setup","count":5},{"language":"it","tag":"Configurazione campagna","count":5},{"language":"en","tag":"Lead Management","count":4},{"language":"it","tag":"Gestione dei lead","count":4},{"language":"en","tag":"Improving a campaign","count":3},{"language":"en","tag":"For existing customers","count":3},{"language":"it","tag":"Migliorare una campagna","count":3},{"language":"it","tag":"Per clienti esistenti","count":3},{"language":"en","tag":"Your workspace","count":2},{"language":"it","tag":"Il tuo spazio di lavoro","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"integrations/webhook","slug":"/integrations/webhook","pageMetadata":{"title":"Webhook","description":"Add leads to a Whappy campaign from your own systems with one HTTP request","icon":"webhook","href":"/integrations/webhook"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Add leads to a Whappy campaign from your own systems with one HTTP request\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`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.`}),`\n`,_jsx(_components.p,{children:`Every account type can use the webhook.`}),`\n`,_jsx(Heading,{level:`2`,id:`open-the-webhook-page`,children:`Open the webhook page`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`Integrations`}),`. The webhook is in the `,_jsx(_components.strong,{children:`Automations`}),` group.`]}),`\n`,_jsx(_components.li,{children:`Turn on its switch. The webhook gets an entry in the sidebar and its card opens its page.`}),`\n`,_jsxs(_components.li,{children:[`Open `,_jsx(_components.strong,{children:`Integrations → Webhook`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Connection`}),` section shows the `,_jsx(_components.strong,{children:`Endpoint`}),` and your `,_jsx(_components.strong,{children:`API key`}),`. The eye button shows the key, the copy button copies it.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Anyone with your API key can add leads to your account. Keep it on your server, never in a web page’s code.`})}),`\n`,_jsx(Heading,{level:`2`,id:`send-a-lead`,children:`Send a lead`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.whappy.ai/v1/lead`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`X-API-Key: YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mario Rossi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+393331234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mario@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Spring promo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tags\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"budget\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:`The lead’s name.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone`})}),_jsxs(_components.td,{children:[`The WhatsApp number. Write it with its international prefix (`,_jsx(_components.code,{children:`+39…`}),`), or set a default country (see below).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`email`})}),_jsx(_components.td,{children:`Optional.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`campaign`}),` or `,_jsx(_components.code,{children:`campaign_id`})]}),_jsx(_components.td,{children:`Optional. The campaign’s name, or its id. Leave both out to use your default campaign.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tags`})}),_jsx(_components.td,{children:`Optional. A list, or text separated by commas. The tags are saved on the lead.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`language`})}),_jsxs(_components.td,{children:[`Optional. The lead’s language, as a code (`,_jsx(_components.code,{children:`es`}),`, `,_jsx(_components.code,{children:`es-ES`}),`) or an English name (`,_jsx(_components.code,{children:`Spanish`}),`). Used when `,_jsx(_components.strong,{children:`Form or page language`}),` is on under `,_jsx(_components.strong,{children:`Language of new leads`}),` (in `,_jsx(_components.strong,{children:`Profile`}),`). An unknown value is ignored.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`any other field`}),_jsxs(_components.td,{children:[`Saved on the lead, like `,_jsx(_components.code,{children:`budget`}),` above. The AI reads it, and WhatsApp templates can use it as `,_jsx(_components.code,{children:`{{budget}}`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`name`}),` and `,_jsx(_components.code,{children:`phone`}),` are what a conversation needs. Fields inside a `,_jsx(_components.code,{children:`lead_data`}),` object are read as if they were at the top level.`]}),`\n`,_jsx(Heading,{level:`3`,id:`which-campaign-gets-the-lead`,children:`Which campaign gets the lead`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`campaign_id`}),`, when you send it.`]}),`\n`,_jsxs(_components.li,{children:[`Otherwise the campaign whose name matches `,_jsx(_components.code,{children:`campaign`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Otherwise your default campaign. You choose it on the `,_jsx(_components.strong,{children:`Campaigns`}),` page: open a campaign’s menu and pick `,_jsx(_components.strong,{children:`Set as default`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`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 `,_jsx(_components.a,{href:`#errors`,children:`Errors`}),`).`]}),`\n`,_jsx(Heading,{level:`3`,id:`phone-numbers-without-a-prefix`,children:`Phone numbers without a prefix`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Profile`}),` and find `,_jsx(_components.strong,{children:`Lead phone numbers`}),`. With a `,_jsx(_components.strong,{children:`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.`]}),`\n`,_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code examples`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`cURL`,id:`curl`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.whappy.ai/v1/lead`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Mario Rossi\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phone\": \"+393331234567\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"mario@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"campaign\": \"Spring promo\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tags\": [\"website\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"budget\": \"5000\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),_jsx(Tab,{title:`JavaScript`,id:`javascript`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.whappy.ai/v1/lead\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Mario Rossi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` phone:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"+393331234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` email:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mario@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` campaign:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Spring promo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tags:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` budget:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"5000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`]})})})}),_jsx(Tab,{title:`Python`,id:`python`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.whappy.ai/v1/lead\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mario Rossi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+393331234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mario@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Spring promo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tags\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"budget\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json())`})]}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`200`}),` answer means the lead is in. `,_jsx(_components.code,{children:`data`}),` is the lead as Whappy saved it (shortened here):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lead created successfully\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mario Rossi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+393331234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mario@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tags\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lead_info\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"budget\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`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 `,_jsx(_components.code,{children:`200`}),`. `,_jsx(_components.code,{children:`message`}),` says what happened:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Lead created successfully`})}),_jsx(_components.td,{children:`A new lead.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Lead already exists; details merged`})}),_jsx(_components.td,{children:`The lead was already there; its details were updated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Lead already exists; details merged and campaign restart requested`})}),_jsxs(_components.td,{children:[`As above, and the campaign starts over with this lead. This happens only when the campaign’s `,_jsx(_components.strong,{children:`Restart the campaign for a lead that comes back`}),` option is on and the conversation had already started.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Body`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"status\": \"error\", \"message\": \"Invalid API key\"}`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`X-API-Key`}),` header holds a key Whappy does not know.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"status\": \"error\", \"message\": \"Authentication required. Provide a valid API key (X-API-Key header) or Bearer token.\"}`})}),_jsxs(_components.td,{children:[`No `,_jsx(_components.code,{children:`X-API-Key`}),` header.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"detail\": \"Phone number '…' is not a valid number…\"}`})}),_jsx(_components.td,{children:`The phone cannot be read as a number. Add the international prefix, or set a default country.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"detail\": {\"code\": \"campaign_not_on_whatsapp\", \"message\": \"…\"}}`})}),_jsx(_components.td,{children:`The campaign does not talk on WhatsApp. Turn on WhatsApp in the campaign’s options, or send the lead to another campaign.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"detail\": [...]}`})}),_jsx(_components.td,{children:`The body is not a JSON object.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"detail\": \"…\"}`})}),_jsx(_components.td,{children:`Whappy could not save the lead. Try again.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`test-it`,children:`Test it`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Send one request with just `,_jsx(_components.code,{children:`name`}),` and your own `,_jsx(_components.code,{children:`phone`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Check the answer is `,_jsx(_components.code,{children:`200`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Open the campaign’s `,_jsx(_components.strong,{children:`Leads`}),` tab and find the new lead.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The lead went to the wrong campaign.`}),` The `,_jsx(_components.code,{children:`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.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The lead is in, but no message arrives.`}),` The campaign has to be running, and your account needs a connected WhatsApp number. See `,_jsx(_components.a,{href:`/integrations/whatsapp`,children:`WhatsApp`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Need help? See the `,_jsx(_components.a,{href:`/support/faq`,children:`FAQ`}),` or `,_jsx(_components.a,{href:`/support/contact-support`,children:`contact support`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Webhook","description":"Add leads to a Whappy campaign from your own systems with one HTTP request","icon":"webhook","href":"/integrations/webhook"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Open the webhook page","slug":"open-the-webhook-page","depth":2,"children":[]},{"title":"Send a lead","slug":"send-a-lead","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Body","slug":"body","depth":3,"children":[]},{"title":"Which campaign gets the lead","slug":"which-campaign-gets-the-lead","depth":3,"children":[]},{"title":"Phone numbers without a prefix","slug":"phone-numbers-without-a-prefix","depth":3,"children":[]}]},{"title":"Code examples","slug":"code-examples","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Test it","slug":"test-it","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"whappy","siteName":"Whappy Documentation","title":"Webhook - Whappy Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/integrations/webhook","matchLevel":0},"it":{"href":"/it/integrations/webhook","matchLevel":1}}},"lastModified":"2026-10-18T12:55:51.075Z","originalFileLocation":"integrations/webhook.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Add leads to a Whappy campaign from your own systems with one HTTP request\">\u003cmeta data-mint-head name=\"application-name\" content=\"Whappy Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhook - Whappy Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add leads to a Whappy campaign from your own systems with one HTTP request\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Whappy Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.whappy.ai/integrations/webhook\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://whappy.mintlify.app/_mintlify/api/og/v2?division=Leads\u0026amp;title=Webhook\u0026amp;description=Add+leads+to+a+Whappy+campaign+from+your+own+systems+with+one+HTTP+request\u0026amp;theme=5306a3f9c915bb314cc5d7a0\u0026amp;signature=0001a65afc2390b2aa6dca3ab19bc5f06e7aa4930465c42ddb46bae8c0283cb4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Webhook - Whappy Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add leads to a Whappy campaign from your own systems with one HTTP request\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://whappy.mintlify.app/_mintlify/api/og/v2?division=Leads\u0026amp;title=Webhook\u0026amp;description=Add+leads+to+a+Whappy+campaign+from+your+own+systems+with+one+HTTP+request\u0026amp;theme=5306a3f9c915bb314cc5d7a0\u0026amp;signature=0001a65afc2390b2aa6dca3ab19bc5f06e7aa4930465c42ddb46bae8c0283cb4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/whappy/UbOIBIQAhwfLKZzi/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Whappy Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0095FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.whappy.ai/integrations/webhook\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/webhook.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.whappy.ai/integrations/webhook\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.whappy.ai/it/integrations/webhook\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.whappy.ai/integrations/webhook\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.whappy.ai/#organization\",\"name\":\"Whappy Documentation\",\"url\":\"https://docs.whappy.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/whappy/kglCbESBYdWSPkHx/logo/light.png?fit=max\u0026auto=format\u0026n=kglCbESBYdWSPkHx\u0026q=85\u0026s=3b6821afdd1e7b66405bdfa84822d7f0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.whappy.ai#website\",\"name\":\"Whappy Documentation\",\"url\":\"https://docs.whappy.ai\",\"publisher\":{\"@id\":\"https://docs.whappy.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.whappy.ai/integrations/webhook#webpage\",\"url\":\"https://docs.whappy.ai/integrations/webhook\",\"name\":\"Webhook\",\"description\":\"Add leads to a Whappy campaign from your own systems with one HTTP request\",\"dateModified\":\"2026-10-18T12:55:51.075Z\",\"isPartOf\":{\"@id\":\"https://docs.whappy.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.whappy.ai/integrations/webhook#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.whappy.ai/integrations/webhook#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Whappy Documentation\",\"item\":\"https://docs.whappy.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhook\",\"item\":\"https://docs.whappy.ai/integrations/webhook\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.whappy.ai/integrations/webhook#article\",\"headline\":\"Webhook\",\"name\":\"Webhook\",\"description\":\"Add leads to a Whappy campaign from your own systems with one HTTP request\",\"url\":\"https://docs.whappy.ai/integrations/webhook\",\"mainEntityOfPage\":{\"@id\":\"https://docs.whappy.ai/integrations/webhook#webpage\"},\"dateModified\":\"2026-10-18T12:55:51.075Z\",\"publisher\":{\"@id\":\"https://docs.whappy.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.whappy.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Whappy Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Whappy Documentation","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Overview","icon":"house","pages":[{"title":"Overview","href":"/introduction"}]},{"tab":"Campaign","icon":"bullhorn","pages":[{"title":"Campaign","href":"/campaign/context"}]},{"tab":"Autopilot","icon":"wand-magic-sparkles","pages":[{"title":"Autopilot","href":"/autopilot/overview"}]},{"tab":"Leads","icon":"users","pages":[{"title":"Leads","href":"/leads/overview"}]},{"tab":"Integrations","icon":"plug","groups":[{"group":"Conversations","pages":[{"title":"WhatsApp","icon":"whatsapp","href":"/integrations/whatsapp"},{"title":"Instagram","icon":"instagram","href":"/integrations/instagram"}]},{"group":"E-commerce","pages":[{"title":"Shopify","icon":"shopify","href":"/integrations/shopify"}]},{"group":"AI clients","pages":[{"title":"Claude and other MCP clients","icon":"sparkles","href":"/integrations/mcp"}]},{"group":"CRM","pages":[{"title":"GoHighLevel","icon":"arrows-rotate","href":"/integrations/gohighlevel"},{"title":"Agency accounts","description":"Run Whappy for the clients you bring in through the GoHighLevel Marketplace, from one Agency page.","icon":"buildings","href":"/integrations/agency"}]},{"group":"Leads","pages":[{"title":"Webhook","icon":"webhook","href":"/integrations/webhook"},{"title":"Zapier","description":"Start Zaps from Whappy conversations and add leads to Whappy from any app Zapier connects.","icon":"bolt","href":"/integrations/zapier"},{"title":"Zapier and Make API","icon":"code","href":"/integrations/zapier-developer"},{"title":"Make","icon":"diagram-project","href":"/integrations/make"}]},{"group":"Appointment Setting","pages":[{"title":"Calendly","icon":"calendar-days","href":"/integrations/calendly"},{"title":"Cal.com","icon":"calendar-check","href":"/integrations/cal"}]},{"group":"Advertising","pages":[{"title":"Meta Ads","icon":"bullseye-arrow","href":"/integrations/meta-conversions"}]}]}]},{"language":"it","pages":[{"title":"it","href":"/it/integrations/webhook"}]}]},"basePath":"","title":"Webhook - Whappy Documentation","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}