This step allows you to call API or Webhook.
This API/Webhook step is helpful to technical users who want to pass data between different apps.
We suggest involving your developer if you are not aware of making API calls and their working mechanism.
How to use "API/ Webhook" Action?
- Let's drag-drop the API Call/Webhook action step on the journey's canvas.
- Click on the step to configure your API call.
- The API calls consist of the following things:
- URL - This is the API call endpoint that accepts the request on a required server.
- Method - Differing HTTP methods can be used on any endpoint that maps to application create, read, update, and delete (CRUD) operations.
- HTTP headers - You can pass authentication tokens or request variables required to execute the call.
- Body - Data is normally transmitted in the HTTP body in the form of RAW data, JSON or XML.
Use Case
Suppose you want to add a subscriber to your MailChimp account. You can use an API call to achieve it.
API documentation can be found here: https://mailchimp.com/developer/marketing/api/list-members/
Let's configure the API:
Method: Post
URL: https://usX.api.mailchimp.com/3.0/lists/{list_id}/members
Headers:
Content-Type: application/json
Authorization: Enter your MailChimp API KEY
- Here X is the data center number - you can find it as the last digit of the Mailchimp API key ex. us8 - here 8 is the data center number
- {list_id} is the list id to which you need to subscribe the contact to
- Authorization: anystring: <mailchimp API key> ex. anystring bfe78c413652314348d1685fc727bb813c-us8 ( Ensure that the spelling of Authorization is as mentioned here )
- Body: raw / JSON (application/json)
{
"email_address":"{{Contact.email}}",
"status":"subscribed",
"merge_fields":{"FNAME":"{{Contact.firstName}}",
"LNAME":"{{Contact.lastName}}",
"COMPANY":"{{Contact.company}}"
}
Comments
0 comments
Article is closed for comments.