Drafts

The draft object

A draft looks like this:

{
"creation_date": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"body": "Lorem ipsum yadda yadda",
"subject": "This is my first email on Buttondown!"
}

fieldtypedescription
creation_datedatetime
iduuid
subjectstring
bodystring

Listing drafts

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

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",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"body": "Lorem ipsum yadda yadda",
"subject": "This is my first email on Buttondown!"
}
]
}

Creating a new draft

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

Parameters

parametertypedescriptionoptional
bodystring
subjectstring

Responses

StatusDescriptionSample Response
201
{
"creation_date": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"body": "Lorem ipsum yadda yadda",
"subject": "This is my first email on Buttondown!"
}

Retrieving a specific draft

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

Responses

StatusDescriptionSample Response
200
{
"creation_date": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"body": "Lorem ipsum yadda yadda",
"subject": "This is my first email on Buttondown!"
}