changelog

You can now programmatically register webhooks with the API!

August 21, 2023

We've added a new endpoint to the API that allows you to register webhooks (or list them, or update them, or delete them.) You can check it out over in the API documentation.

While I imagine programmatic webhooks are overkill to many people, there are many use cases this enables for platforms managing multiple newsletters on top of Buttondown:

  • If you're running a suite of ten newsletters, each with different primary authors, you can dynamically register webhooks to notify those authors when a new subscriber signs up.
  • If you're programmatically registering newsletters and syncing them with your own data store over time, you can further automate this process by registering webhooks alongside newly created newsletters instead of having to manually register them.

Here's an example invocation, just for fun:

requests.post("https://buttondown.com/v1/webhooks", {
    "url": "https://example.com/webhook",
    "event_type": "subscriber.created"
})

That's all! Happy programming!

Updated on

August 21, 2023

Written by

Justin Duke

Justin Duke is a software engineer, lover of words, and the creator of Buttondown.

No credit card required. Only pay for what you use. Cancel anytime.