Introduction
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.
Set up a webhook in Xendy
Here’s how to create a webhook in Xendy:
- Log in to Xendy and choose ‘All contacts’ in the left menu, then click again on ‘All contacts’ in the top right. Select ‘Create new segment’. Choose ‘Static’. Enter a name for the segment and click ‘Create segment’ to create it.
- Now click on ‘Add contacts’ in the top right and choose ‘Via a webhook’. A pop-up will appear with a URL and an Authorization: Bearer token.
You will use this information in your other system (such as Zapier, a popup tool, or a CRM) to automatically send contacts to Xendy.
Send data
When sending data to Xendy, you must include at least one field:
- email (required).
Optionally, you can also include other fields:
- First name: first_name
- Last name: last_name
- Custom fields: choose your own name, such as company or phone.
Extra fields are automatically added in Xendy and can be used in segments or personalization.
Example JSON payload:
{
“email”: “customer@example.com”,
“first_name”: “John”,
“last_name”: “Doe”,
“phone”: “0612345678”
}
Authentication
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.
Always use the following format in the headers of your request: Authorization: Bearer abc123
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.
Test the connection
To check if everything is working correctly, you can perform a test:
- Send data to the webhook URL, for example by submitting a form, triggering a popup, or updating a contact in your CRM system.
- Log in to Xendy and choose ‘All contacts’ in the left menu, then click again on ‘All contacts’ in the top right. Select the segment you created. Check the list to see if the email address appears.
Frequently Asked Questions
- Log in to Xendy and choose ‘All contacts’ in the left menu, then click again on ‘All contacts’ in the top right. Select ‘Create new segment’. Choose ‘Static’. Enter a name for the segment and click ‘Create segment’ to create it.
- Now click on ‘Add contacts’ in the top right and choose ‘Via a webhook’. A pop-up will appear with a URL and an Authorization: Bearer token.
You will use this information in your other system (such as Zapier, a popup tool, or a CRM) to automatically send contacts to Xendy.
