How to setup webhooks from external partners with endpoints in Meiro
This document will teach you how to set up webhooks from external partners for event collection in Meiro Events. In this article, we will be using SmartEmailing’s webhook in the examples.
Requirements before starting
- Username and Password/API token from the account in partner’s app/website. These credentials are needed for setup and data collection.
- External partner’s API endpoint URL and documentation
Learn more: about SmartEmailing API v3 reference
3. Meiro Events database to be set up for data storage.
Setting up webhook
Open the command prompt and use curl to set up the webhook.
For each event, enter the following command. This will create a webhook for each event type.
>> curl -X POST <source_url> -u "<username>":"<password/api_token>" -d
|
Example:
In Available events that we can use from SmartEmailing: new_contact, delivery_status, updated_contact, unsubscribed_contact, newsletter_sending_started, newsletter_sending_finished, sent_email, scoring_result_changed, meiro_delivered_email, meiro_sent_email, meiro_open, meiro_click Check webhook set upTo check if the webhook has been set up, you can either check if events are streaming into the database or run an API call to GET the webhooks being set up by entering the following command.
Example:
Here is an example output. It is important to check that the URL and event match the setup.
Back to top
|