1. Home
  2. Support
  3. Postalytics User Guides & Documentation
  4. Incoming Webhook Integrations
  5. Incoming Webhook Authentication And HTTP Request Info

Incoming Webhook Authentication And HTTP Request Info

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.

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 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.

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”
}

Was this article helpful to you? Yes No

How can we help?