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.

Key

Value

Type

id

Post ID

String

title

Title of the post

String

subtitle

Subtitle of the post

String

textPreview

First 280 chars of post body in plain text

String

body

Post body in HTML

String

text

Post body as plain text

String

slug

Slug portion of URL for the post

String

publishedOn

Date post was published on

Date

coverImage

Cover image URL hosted on Letterdrop CDN

String

thumbnail

Thumbnail image URL

String

status

Whether the post is published or updated. Takes values published, updated or deleted

String

tags

List of tags

List (String)

publication

Workspace domain name

String

updated

Date when post was updated

String

readTime

Read time of the post in minutes

String

wordCount

Number of words in post

Number

featured

Whether the post is featured post or not

Boolean

author

Author object with fields name (String), avatar (String)

Object

url

Full URL of final post

String

metaTitle

Meta title of post

String

metaDescription

Meta description of post

String

markdown

Post body as Markdown

String

customFields

List of custom field objects defined in workspace. Each item contains name (String), type (String), value, and other type-specific metadata.

List (Object)

destination

Destination of post

String

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.

Key

Value

Type

email

Email of subscriber

String

signedUpOn

Date user subscribed on

Date

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.

Key

Value

Type

email

Email of subscriber

String

unsubscribedOn

Date user unsubscribed on

Date

Sample payload

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

Subscriber updated

Triggers when a subscriber is updated.

Key

Value

Type

email

Email of subscriber

String

field

Updated field

String

value

New value of the field

String

Sample payload

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

Project created or updated

Triggers when a project is created or updated.

KeyValueType

title

Project title

String

description

Project description

String

labels

List of labels

List

keyword

Keyword associated with project

String

status

Project status

String

suggestedBy

Email of the user who suggested the idea

String

suggestedOn

Date idea was suggested on

Date

assignedBy

Email of the user who assigned the project

String

assignedTo

Email of the user who will work on the project

String

contributors

List of emails of users who can contribute to the project

List

contentMapDeadline

Content Map deadline

Date

approvers

List of emails of approvers

List

reviewDeadline

Review deadline

Date

approvedBy

Email of user who approved the project

String

publishDate

Publish date

Date

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