Webhooks

Learn how to use webhooks to get alerts on subscriber and post events.

Checking for the API Key

We send a POST request to the webhook endpoints you specify. To verify that the request came from Letterdrop, check for a field in the header of the request with key api-key and make sure it matches the value in your Settings.

If the API Key is absent, you're getting hit up with requests from our evil twin from another dimension. Do not trust him under any circumstances!

Post published, updated, or deleted

Triggers when a new post is published.

Sample payload

{
  "id": "6030dc61a21da91db1d593c0",
  "title": "Title",
  "subtitle": "Subtitle",
  "text": "Lorem ipsum dolor sit amet...",
  "textPreview": "Lorem ipsum dolor sit amet"
  "body": "<p>Lorem ipsum dolor sit amet,</p>",
  "slug": "my-new-post",
  "url": "https://letterdop.com/blog/my-new-post",
  "publishedOn": "2020-10-20T12:18:13.095Z",
  "coverImage": "https://cdn.letterdrop.co/images/2022/11/24/hir0hq8n.jpeg",
  "thumbnail": "https://cdn.letterdrop.co/images/2022/11/24/hir0hq8n.jpeg",
  "metaTitle": "Meta Title",
  "metaDescription": "This is a post via Letterdrop",
  "status": "published",
  "tags": ["chocolate", "food", "restaurant"],
  "updated": "2020-10-20T12:18:13.095Z",
  "publication": "piedpiper",
  "readTime": 3,
  "wordCount": 1565,
  "featured": false,
  "markdown": "Lorem ipsum dolor sit amet"
  "customFields": [
    {
      "name": "Related Posts",
      "type": "Multi-Select List",
      "value": "",
      "allowedValues": [
        "Post 1", "Post 2", ...
      ]
    },
    ...
  ]
}

Subscriber added

Triggers when a new email was added to your subscriber list.

Sample payload

{
  "email": "support@letterdrop.co",
  "signedUpOn": "2020-10-20T12:07:13.629Z"
}

Subscriber removed

Triggers when an email was removed from your subscriber list.

Sample payload

{
  "email": "support@letterdrop.co",
  "unsubscribedOn": "2020-10-20T12:07:13.629Z"
}

Subscriber updated

Triggers when a subscriber is updated.

Sample payload

{
  "email": "support@letterdrop.co",
  "field": "name",
  "value": "john"
}

Project created or updated

Triggers when a project is created or updated.

Sample payload

{
  title: 'Project title',
  description: 'Project description',
  labels: [ 'label1', 'label2', 'label3' ],
  keyword: 'keyword',
  status: 'content_map_draft',
  suggestedBy: 'support@letterdrop.co',
  suggestedOn: '2022-07-19T16:43:35.033Z',
  assignedBy: 'support@letterdrop.co',
  assignedTo: 'support@letterdrop.co',
  contributors: [ 'support@letterdrop.co' ],
  contentMapDeadline: '2022-07-27T03:30:00.000Z',
  approvers: [ 'support@letterdrop.co' ],
  reviewDeadline: '2022-08-04T03:30:00.000Z',
  approvedBy: 'support@letterdrop.co',
  publishDate: '2022-08-05T03:30:00.000Z'
}

Last updated