ExternalFeed
An automation is a one-to-one mapping between an external RSS feed and an action to be performed when new items are detected in that feed. Right now, Buttondown offers two actions:
- Send an email
- Create an email but save it as a draft to be sent out manually
The automation is configured with a cadence, which is the frequency at which the automation will be run. The cadence can be one of the following:
- Run the automation every time a new item is detected in the feed
- Run the automation once per week
- Run the automation once per month
Basic automation
{"creation_date": "2019-08-24T14:15:22Z","id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "active","behavior": "emails","cadence": "every","subject": "New post: {{ item.title }}","body": "I just published a new post: {{ item.url }}"}
field | type | description |
---|---|---|
id | string | |
creation_date | string | |
last_checked_date | string | |
status | ExternalFeedAutomationStatus | |
behavior | ExternalFeedAutomationBehavior | |
cadence | ExternalFeedAutomationCadence | |
cadence_metadata | object | |
included_tags | array | |
url | string | |
subject | string | |
body | string |
Behavior (ExternalFeedAutomationBehavior)
An enumeration.
type | identifier | description |
---|---|---|
Create draft | draft | Create a draft email |
Send email | emails | Send emails to subscribers |
Status (ExternalFeedAutomationStatus)
An enumeration.
type | identifier | description |
---|---|---|
Active | active | Active |
Inactive | inactive | Inactive |
Cadence (ExternalFeedAutomationCadence)
An enumeration.
type | identifier | description |
---|---|---|
Every new item | every | Act every single time a new item is added to the RSS feed |
Weekly | weekly | Act every week, compiling a digest of new items |
Monthly | monthly | Act every month, compiling a digest of new items |
Create External Feed
python
ruby
curl
Copy to clipboard
curl -X POST https://api.buttondown.email/v1/external_feeds
Parameters
parameter | type | description | optional |
---|---|---|---|
url | string | ||
behavior | |||
cadence | |||
cadence_metadata | object | ||
included_tags | array | ||
subject | string | ||
body | string |
Responses
Status | Description | Sample Response |
---|---|---|
201 | Created |
|
400 | Bad Request |
|
403 | Forbidden |
|
List External Feed
python
ruby
curl
Copy to clipboard
curl -X GET https://api.buttondown.email/v1/external_feeds
Responses
Status | Description | Sample Response |
---|---|---|
200 | OK |
|
403 | Forbidden |
|
Update External Feed
python
ruby
curl
Copy to clipboard
curl -X PATCH https://api.buttondown.email/v1/external_feeds/{pk}
Parameters
parameter | type | description | optional |
---|---|---|---|
behavior | |||
cadence | |||
cadence_metadata | object | ||
included_tags | array | ||
subject | string | ||
body | string | ||
status |
Responses
Status | Description | Sample Response |
---|---|---|
200 | OK |
|
400 | Bad Request |
|
403 | Forbidden |
|
Delete External Ffeed
python
ruby
curl
Copy to clipboard
curl -X DELETE https://api.buttondown.email/v1/external_feeds/{pk}
Responses
Status | Description | Sample Response |
---|---|---|
204 | No Content |
|
403 | Forbidden |
|
404 | Not Found |
|
Retrieve External Feed
python
ruby
curl
Copy to clipboard
curl -X GET https://api.buttondown.email/v1/external_feeds/{pk}
Responses
Status | Description | Sample Response |
---|---|---|
200 | OK |
|
403 | Forbidden |
|