Incoming webhooks are a simple way to use Postalytics Triggered Drip Campaigns to “trigger” Postalytics Direct Mail from 3rd party automation tools. Most modern CRM, Marketing Automation, Customer Data Platform and Email marketing tools now have the ability to send a webhook as a triggered event. If you’d like to trigger Postalytics mail from a source that we haven’t yet built an integration with, the Incoming Webhook feature might be the tool for you.
In order to properly process an Incoming Webhook and automatically send the proper direct mail piece to your recipients, you’ll need to structure the communication between your 3rd party data source and Postalytics.
The first step is to get an authentication key. The authentication key for your account is generated when you create your first “Incoming Webhook Triggered Drip Campaign“. It is available to be copied/pasted from the “Campaign Settings” page of your campaign.
The Webhook URL, Authentication Information and HTTP Request Information are also available under “Campaign Settings”.
Authentication Information
Requests made to the API are protected with HTTP Basic authentication. In order to properly authenticate with the API you must use the API key for the account you are making calls for. This could be a single master account or a sub-account of an agency. Requests not properly authenticated will return a 401 error code.
When creating the base 64-encoded string for the Authorization header, the authentication key will be placed in the username part of the string while the password part will be empty. e.g. username:password should look like YourAuthenticationKey:
*Note that this call must be done via HTTPS.
HTTP Request Information
Once a drip campaign has been created, you can call the API to kick off a drip to the recipient provided. If successful, the API will return a unique id for this piece.
Request Method
POST: https://(Incoming Webhook URL)
The full incoming webhook URL is available for testing & production after the creation of each Incoming Webhook Triggered Drip Campaign.
Request Headers
Content-Type: application/json
Authorization: Basic ABC123
Request Body:
{
“first_name”: “Sally”,
“last_name” : “Jones”,
“company” : “Sally Jones Design”,
“address_street” : “234 East Ave”,
“address_street2” : “”,
“address_city” : “Beverly Hills”,
“address_state” : “CA”,
“address_zip” : “90210”,
“var_field_1” : “This is a variable field”,
“var_field_2” : “This is a variable field”,
“var_field_3” : “This is a variable field”,
“var_field_4” : “This is a variable field”,
“var_field_5” : “This is a variable field”
}