{"id":92,"date":"2024-11-22T13:52:35","date_gmt":"2024-11-22T13:52:35","guid":{"rendered":"https:\/\/xendy.me\/create\/?p=92"},"modified":"2025-10-27T18:50:18","modified_gmt":"2025-10-27T18:50:18","slug":"webhooks-integration","status":"publish","type":"post","link":"https:\/\/support.xendy.me\/en\/webhooks-integration\/","title":{"rendered":"Connect with Xendy via Webhooks"},"content":{"rendered":"<div class=\"row\"  id=\"row-1562105229\">\n\n\t<div id=\"col-1988540113\" class=\"col medium-4 small-12 large-4\"  >\n\t\t<div class=\"is-sticky-column\" data-sticky-mode=\"javascript\"><div class=\"is-sticky-column__inner\">\t\t<div class=\"col-inner\"  >\n\t\t\t\n\t\t\t\n<h3>Contents<\/h3>\n<div class=\"article-index\" style=\"margin-bottom: 20px;\"><style>\n        .article-index a:hover {\n            text-decoration: underline;\n        }\n    <\/style><div style=\"font-weight: 500; font-size: 12px;\"><a href=\"#introduction\">Introduction<\/a><\/div><div style=\"font-weight: 500; font-size: 12px;\"><a href=\"#set-up-a-webhook-in-xendy\">Set up a webhook in Xendy<\/a><\/div><div style=\"font-weight: 500; font-size: 12px;\"><a href=\"#send-data\">Send data<\/a><\/div><div style=\"font-weight: 500; font-size: 12px;\"><a href=\"#authentication\">Authentication<\/a><\/div><div style=\"font-weight: 500; font-size: 12px;\"><a href=\"#test-the-connection\">Test the connection<\/a><\/div><div style=\"font-weight: 500; font-size: 12px;\"><a href=\"#frequently-asked-questions\">Frequently Asked Questions<\/a><\/div><\/div>\n\t\t<\/div>\n\t\t<\/div><\/div>\t\t\t<\/div>\n\n\t\n\n\t<div id=\"col-346384369\" class=\"col medium-8 small-12 large-8\"  >\n\t\t\t\t<div class=\"col-inner\"  >\n\t\t\t\n\t\t\t\n<h2 id=\"introduction\">Introduction<\/h2>\n<p>With webhooks, you can automatically send data from other systems to Xendy. Think of sign-ups via a popup, a form, or your CRM. New contacts are added directly to a segment in Xendy, without you needing to import anything manually.<\/p>\n<h2 id=\"set-up-a-webhook-in-xendy\">Set up a webhook in Xendy<\/h2>\n<p>Here\u2019s how to create a webhook in Xendy:<\/p>\n<ol>\n<li aria-level=\"1\">Log in to Xendy and choose \u2018<b>All contacts<\/b>\u2019 in the left menu, then click again on \u2018<b>All contacts<\/b>\u2019 in the top right. Select \u2018<strong>Create new segment<\/strong>\u2019. Choose \u2018<strong>Static<\/strong>\u2019. Enter a name for the segment and click \u2018<b>Create segment<\/b>\u2019 to create it.<\/li>\n<li aria-level=\"1\">Now click on \u2018<b>Add contacts<\/b>\u2019 in the top right and choose \u2018<b>Via a webhook<\/b>\u2019. A pop-up will appear with a URL and an Authorization: Bearer token.<\/li>\n<\/ol>\n<p>You will use this information in your other system (such as Zapier, a popup tool, or a CRM) to automatically send contacts to Xendy.<\/p>\n<h2 id=\"send-data\">Send data<\/h2>\n<p>When sending data to Xendy, you must include at least one field:<\/p>\n<ul>\n<li aria-level=\"1\">email (required).<\/li>\n<\/ul>\n<p>Optionally, you can also include other fields:<\/p>\n<ul>\n<li aria-level=\"1\">First name: first_name<\/li>\n<li aria-level=\"1\">Last name: last_name<\/li>\n<li aria-level=\"1\">Custom fields: choose your own name, such as company or phone.<\/li>\n<\/ul>\n<p>Extra fields are automatically added in Xendy and can be used in segments or personalization.<\/p>\n<p>Example JSON payload:<\/p>\n<p>{<\/p>\n<p>  &#8220;email&#8221;: &#8220;customer@example.com&#8221;,<\/p>\n<p>  &#8220;first_name&#8221;: &#8220;John&#8221;,<\/p>\n<p>  &#8220;last_name&#8221;: &#8220;Doe&#8221;,<\/p>\n<p>  &#8220;phone&#8221;: &#8220;0612345678&#8221;<\/p>\n<p>}<\/p>\n<h2 id=\"authentication\">Authentication<\/h2>\n<p>Each webhook call must include a security token. You receive this token from Xendy when creating the webhook. Without this token, the data will not be accepted.<\/p>\n<p>Always use the following format in the headers of your request: Authorization: Bearer abc123<\/p>\n<p>Replace abc123 with the token you received from Xendy. Make sure to always include the full text Authorization: Bearer followed by the code. This ensures that only your system can send data to your Xendy account.<\/p>\n<h2 id=\"test-the-connection\">Test the connection<\/h2>\n<p>To check if everything is working correctly, you can perform a test:<\/p>\n<ol>\n<li aria-level=\"1\">Send data to the webhook URL, for example by submitting a form, triggering a popup, or updating a contact in your CRM system.<\/li>\n<li aria-level=\"1\">Log in to Xendy and choose \u2018<b>All contacts<\/b>\u2019 in the left menu, then click again on \u2018<b>All contacts<\/b>\u2019 in the top right. Select the segment you created. Check the list to see if the email address appears.<\/li>\n<\/ol>\n<h2 id=\"frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<div class=\"accordion\">\n\t<div id=\"accordion-4043876529\" class=\"accordion-item\">\n\t\t<a id=\"accordion-4043876529-label\" class=\"accordion-title plain\" href=\"#accordion-item-how-do-i-get-the-webhook-url-from-xendy?\" aria-expanded=\"false\" aria-controls=\"accordion-4043876529-content\" >\n\t\t\t<button class=\"toggle\" aria-label=\"Toggle\"><i class=\"icon-angle-down\"><\/i><\/button>\n\t\t\t<span>How do I get the webhook URL from Xendy?<\/span>\n\t\t<\/a>\n\t\t<div id=\"accordion-4043876529-content\" class=\"accordion-inner\" aria-labelledby=\"accordion-4043876529-label\" >\n\t\t\t\n<ol>\n<li aria-level=\"1\">Log in to Xendy and choose \u2018<b>All contacts<\/b>\u2019 in the left menu, then click again on \u2018<b>All contacts<\/b>\u2019 in the top right. Select \u2018Create new segment\u2019. Choose \u2018Static\u2019. Enter a name for the segment and click \u2018<b>Create segment<\/b>\u2019 to create it.<\/li>\n<li aria-level=\"1\">Now click on \u2018<b>Add contacts<\/b>\u2019 in the top right and choose \u2018<b>Via a webhook<\/b>\u2019. A pop-up will appear with a URL and an Authorization: Bearer token.<\/li>\n<\/ol>\n<p>You will use this information in your other system (such as Zapier, a popup tool, or a CRM) to automatically send contacts to Xendy.<\/p>\n\t\t<\/div>\n\t<\/div>\n\t\n<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\n\t\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-integrations"],"_links":{"self":[{"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":9,"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":1779,"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/posts\/92\/revisions\/1779"}],"wp:attachment":[{"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.xendy.me\/en\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}