How can I use webhooks with Letterhead?

Webhooks are automated messages sent from applications, whenever a specific event occurs, and can be used to trigger an event in another app.

These messages, also known as payloads, are delivered to a unique URL. Webhooks are generally faster and require less effort than polling for changes.  This new functionality allows Letterhead customers to easily sync their data from other apps, such as CMSes, CRMs and team chat tools with Letterhead. 

Users can now send the following data from Letterhead to another app via webhook:

  1. Audience member created or updated
  2. Newsletter published
  3. Newsletter scheduled
  4. Promotion campaign created
  5. Promotion campaign details updated
  6. Promotion campaign promotion changed
  7. Promotion campaign status changed

When should I use a webhook?

You can use a webhook to trigger an action in another application based on an event in Letterhead. For example, if an audience member is created or updated, you may want them to receive a separate marketing email from your CRM.  Or notify an advertiser when your latest edition published with their ad.

How do I access the webhook options?

  1. Log in to your account, and in the menu on the left, click on your organization.  In this example, our organization is Black Bitter Coffee, and it has two channels, or newsletters, under that brand.  The top option is the organization.
  2. Once the organization page loads, click on Settings.
  3. Once the Settings page loads, look for the menu on the top right of the page, and select Webhooks.
  4. Click the Create a webhook button in the middle of the page, if you do not have any webhooks yet (if there are webhooks, you will see a New webhook button on the top right of the list of existing webhooks).
  5. Once the slide-out opens, select the event you would like to track.
  6. Next, enter the endpoint (URL), which is a secure URL where Letterhead will post to.
  7. Once you have entered your endpoint, click the Active toggle.  It will show an checkmark when enabled.
  8. Click Create.
  9. Once you click Create, if it is created successfully, you will see the confirmation below.

How can I remove a webhook?

In addition to creating the webhooks, you can deactivate and/or delete any webhooks you create within Letterhead.  To delete, hover over the webhook row and you'll see the delete icon.  This will permanently deactivate and remove the webhook.  

If you prefer to simply deactivate it, click on the Active toggle, so that it no longer has a checkmark, and it is grayed out with an 'x'.