|Table of Contents|
This is a sample call by the "Unsubscribe" webhook for the customer "firstname.lastname@example.org", unsubscribing from list #2.
- The variables in the querystring can use any name. You set the variable name when creating the Parameters for the webhook in the MailUp admin console.
- You may encrypt the data passed in the callback. In the querystring shown above, the data is not encrypted.
- Dates are passed in the ISO format (YYYY-MM-DD)
Unsubscribing a recipient in a different list
One of the uses for Webhooks is to trigger an unsubscribe in a different List within your account. For example, let's say that you make an API call to unsubscribe a recipient from List 1 using the xmlunsubscribe.aspx page, and then need the same recipient to also be unsubscribed from List 2. Instead of making multiple API calls, you can accomplish the same goal by using Webhooks.
Create a new Webhook, and configure it as follows:
- Name: enter a descriptive name
- Type: Unsubscribe
- Source: API
- email = [email]
Notifying another application of an email change
MailUp handles a change in a subscriber's email as two connected events:
- Unsubscribing the old email
- Subscribing the new email with the "old" subscriber's data
In other words, the "old" email is unsubscribed from the List(s), the new email is added as a new subscriber to the same List(s), and the data stored in the custom fields is transferred over to the new subscriber's profile.
For this reason, there is no "email changed" Webhook that can be triggered. That said because a "subscribe" event does indeed occur when there is a change in the email address, you could pass that piece of information to another application if there is a custom field - not the email address - that identifies the customer. For example, there may be a CustomerID custom field that holds the ID of that person in a CRM or e-commerce system.
If that is the case, you only need to trigger a "subscribe" Webhook that passes to the external system's callback URL:
- The email
- The identifier (e.g. the "CustomerID" value)
The page located at the Callback URL will need to match the identifier with that of an existing user (if any) and update their email with the one passed by MailUp.