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.
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 base64-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.
Authentication Key: The full authentication key for your account is generated upon the creation of your first Incoming Webhook URL Triggered Drip Campaign.
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.
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.
Authorization: Basic ABC123
“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”