Buttondown Documentation
We've already covered how to create, list, and update emails using the Buttondown API. Here, we’ll take things a step further by learning how to programmatically schedule emails. This may come in handy if:
The best part? We only have to add two new lines of code.
As promised, it only takes two extra lines of code to specify your email’s “Status” and “Publish Date.”
Scheduled emails follow a similar set of parameters as non-scheduled emails —that is, except for the “Publish Date” and “Status.” In this case, “Publish Date” should be a date and time in the future, and “Status” should be “Scheduled.”
So you’ve submitted your request to the Buttondown API. How do you know if it worked? There are three ways to check:
Change your mind about your email's pub date? No worries—it’s a quick fix. All you need is an "Email ID" and a few more lines of code.
How do you find your "Email ID" you may ask? There are two ways:
Once you have your "Email ID" at the ready, you can use the following code to update your "Publish Date."
Stuff happens. If you decide that you’d rather save your scheduled email as a draft for later, you can do so by changing your email’s "Status."
Our support team is always here to help. Just send us a message and we'll take a look!