Or: here are some common API operations to get you started.
import requestsurl = "https://api.buttondown.com/v1/emails"headers = { "Authorization": "Token $BUTTONDOWN_API_KEY", "Content-Type": "application/json"}data = { "subject": "Weekly Newsletter - Product Updates", "body": """# Product Updates This WeekHey everyone! Here's what's new:## New Features- **Advanced Analytics**: Track subscriber engagement like never before- **Custom Templates**: Create your own email designs- **API Improvements**: Faster response times and better error handling## Coming Soon- Mobile app for iOS and Android- Advanced automation workflows- Integration with 50+ popular toolsThanks for being part of our community!Best,The Team""", "status": "sent"}response = requests.post(url, headers=headers, json=data)print(response.json())
Now, you shouldn't have to use the API. The interface and integrations like Zapier should get the job done for the vast majority of use cases.
But if you've got a special connection you have in mind (like wanting to programmatically build and deliver emails for your SaaS, or to integrate with your own analytics stack) — or, hell, because you're just a nerd and prefer sending your newsletter from the comfort of emacs rather than Chrome or Safari, Buttondown is the tool for you.
Buttondown is the last email platform you’ll switch to.