Exports

Some software applications may want programmatic access to their newsletter exports. This assists with a few niche use cases, such as regular backups or data ingestion (into a data warehouse), or post-publishing processes that hinge on email events. In general, you probably won't need to use this endpoint unless you absolutely need to use this endpoint.

The export object

An export looks like this:

{
"creation_date": "2019-08-24T14:15:22Z",
"completion_date": "2019-08-24T15:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "s3://buttondown/path-to-export",
"status": "completed"
}

fieldtypedescription
creation_datedatetime
completion_datedatetime
statusstatus
iduuid
urlstring

Listing exports

GET https://api.buttondown.email/v1/exports

Parameters

parametertypedescriptionoptional
pagestringA page number within the paginated result set.

Responses

StatusDescriptionSample Response
200
{
"count": 1,
"next": "foo",
"previous": null,
"results": [
{
"creation_date": "2019-08-24T14:15:22Z",
"completion_date": "2019-08-24T15:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "s3://buttondown/path-to-export",
"status": "completed"
}
]
}

Creating a new export

POST https://api.buttondown.email/v1/exports

Parameters

parametertypedescriptionoptional

Responses

StatusDescriptionSample Response
201
{
"creation_date": "2019-08-24T14:15:22Z",
"completion_date": "2019-08-24T15:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "s3://buttondown/path-to-export",
"status": "completed"
}

Deleting an export

DELETE https://api.buttondown.email/v1/exports/<id>

Responses

StatusDescriptionSample Response
204
{}

Retrieving a specific export

GET https://api.buttondown.email/v1/exports/<id>

Responses

StatusDescriptionSample Response
200
{
"creation_date": "2019-08-24T14:15:22Z",
"completion_date": "2019-08-24T15:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "s3://buttondown/path-to-export",
"status": "completed"
}