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!

New post

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

textBody

Short sample of post body in plain text

String

htmlBody

Post body in HTML

String

url

URL of post

String

publishedOn

Date post was published on

Date

type

Whether the post is paid or free. Takes values paid or free.

String

coverPhoto

Cover photo URL

String

thumbnail

Thumbnail image URL

String

status

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

String

tags

List of tags

List

isPrivate

Whether the post is visible on blog

Boolean

Sample payload

{
"id": "6030dc61a21da91db1d593c0",
"title": "Title",
"subtitle": "Subtitle",
"textBody": "Lorem ipsum dolor sit amet,",
"htmlBody": "<p>Lorem ipsum dolor sit amet,</p>",
"url": "https://letterdop.com/@updates/my-new-post",
"publishedOn": "2020-10-20T12:18:13.095Z",
"type": "free",
"coverPhoto": "https://app.letterdrop.com/resources/images/default_cover_photo.jpg",
"thumbnail": "https://app.letterdrop.com/resources/images/thumbnail.jpg",
"status": "published",
"tags": ["chocolate", "food", "restaurant"],
"isPrivate": false
}

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

planType

Paid or free

String

Sample payload

{
"email": "[email protected]",
"signedUpOn": "2020-10-20T12:07:13.629Z",
"planType": "paid"
}

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

planType

Paid or free

String

Sample payload

{
"email": "[email protected]",
"unsubscribedOn": "2020-10-20T12:07:13.629Z",
"planType": "paid"
}

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": "[email protected]",
"field": "name",
"value": "john"
}

Referral tier achieved

Triggers when a subscriber makes enough referrals to unlock a new level in your referral tiers.

Key

Value

Type

email

Email of subscriber

String

unsubscribedOn

Date user unsubscribed on

Date

planType

Paid or free

String

Sample payload

{
"email": "[email protected]",
"unsubscribedOn": "2020-10-20T12:07:13.629Z",
"planType": "paid"
}