Events and Webhooks

Events are Buttondown's way of telling you that something interesting has happened to your newsletter, and webhooks are Buttondown's way of letting you react to various incoming events. For example, when a new subscriber signs up for your newsletter, Buttondown creates and emits a `subscriber.created` event; when that subscriber unsubscribes, Buttondown creates a `subscriber.unsubscribed` event. If you wanted to, say, create a Slack notification or run some application code whenever something in Buttondown happens, you'd create a webhook for the concomitant event and point it towards your application.

The payload of most events are fairly simple, and look something like this:

{
"event_type": "subscriber.confirmed",
"payload": {
"subscriber": "ac79483b-cd28-49c1-982e-8a88e846d7e7"
}
}

Events

Event typedescription
subscriber.createdWhenever a new subscriber is created
subscriber.unsubscribedWhen a subscriber has manually unsubscribed from your newsletter
subscriber.confirmedWhen a subscriber has confirmed that they are enrolled in your newsletter. (For newsletters without double opt-in, this event is created immediately after `subscriber.created`.)
subscriber.trial_startedWhen the trial has started for a subscriber. (For newsletters with automatic free trials, this will be created immediately after `subscriber.confirmed`.)
subscriber.trial_endedWhen the trial has ended for a subscriber.
subscriber.paidWhen a subscriber has enrolled in your newsletter's paid offering
subscriber.churnedWhen a subscriber has unenrolled from your newsletter's paid offering
subscriber.updatedWhen a subscriber's notes or metadata has changed
email.createdWhenever a new email is created and delivered