- Overview
- Authentication
- Libraries
- Methods
- Contacts
- Import file
- Bulk Import
- Contact import current status
- Contact import history
- Subscriptions
- Attributes
- Lists
- Subscribers
- Subscription forms
- Mails
- Drafts
- Send
- Sent
- Scheduled
- Auto-responder mails
- Templates
- HTML
- Block
- Auto-responders
- Profile
- Address
- Senders
- Reports
- Bounces
- Clicks
- Links
- Opens
- Opens aggregated
- Have not opened
- Most active customers
- Unsubscriptions
- Invoices
- Notifications
Sent mails
You can either display a list with links to all your sent mails or display single mails in full. This is all possible through the sent object.
Renders: [application/json, text/html, application/xml]
Parsers: [application/json, application/x-www-form-urlencoded, multipart/form-data]
Readonly fields
id
url
body
plain_text
subject
sender_id
sender_name
sender_email
time_to_send
lists
type
preview_url
css
mail
test
tell_a_friend
utm_campaign
utm_medium
utm_source
report_url
report_id
updated
share_url
Example sent mail
{
"id": 1,
"url": "https://api.getanewsletter.com/v3/mails/sent/123456/",
"body": "",
"plain_text": "",
"subject": "Mail subject",
"sender_id": 132,
"sender_name": "John Doe",
"sender_email": "john.doe@example.com",
"time_to_send": "2017-09-13T08:59:31Z",
"lists": [
{
"hash": "hiso7tuNb4Z",
"name": "My list"
}
],
"type": 1,
"preview_url": "https://api.getanewsletter.com/v3/preview_mail/1/?public_key=12345678910",
"css": "",
"mail": 1,
"test": false,
"tell_a_friend": "12345678920",
"tracking": [
{
"params": {
"utm_campaign": "cmp_123456",
"utm_medium": "email",
"utm_source": "getanewsletter"
},
"type": 0
}
],
"report_url": "https://api.getanewsletter.com/v3/reports/123456/",
"report_id": 123456,
"updated": "2017-09-13T08:59:31Z",
"share_url": "http://gantrack.com/t/pm/12345678910/"
}
GET /mails/sent/
Responds with a list of sent emails, like usual we provide next
, prev
, count
and the results
Possible url parameters are:
- page:
<int>
Example:
{
"count": 30,
"next": "https://api.getanewsletter.com/v3/mails/sent/?page=2",
"previous": null,
"results": [
{
"id": 1,
"url": "https://api.getanewsletter.com/v3/mails/sent/1/",
"subject": "Mail subject",
"sender_id": 132,
"sender_name": "John Doe",
"sender_email": "john.doe@example.com",
"time_to_send": "2017-09-13T08:59:31Z",
"lists": [
{
"hash": "hiso7tuNb4Z",
"name": "My list"
}
],
"type": 1,
"preview_url": "https://api.getanewsletter.com/v3/preview_mail/1/?public_key=12345678910",
"mail": 1,
"report_url": "https://api.getanewsletter.com/v3/reports/123456/",
"report_id": 123456,
"updated": "2017-09-13T08:59:31Z",
"status": 3,
"queued": true,
"share_url": "http://gantrack.com/t/pm/12345678910/"
}
]
}
GET /mails/sent/<id>/
The details view includes the following additional fields: body
, plain_text
and css
.
Note: Please have in mind that we do not support the creation and editing of block emails via the API, yet.
The body
and plain_text
fields for block emails will be filled with null until the block editor is made available
via the API. This means you can still use the block editor from the website to create the email and then send it from the API.
Example:
{
"id": 1,
"url": "https://api.getanewsletter.com/v3/mails/sent/123456/",
"body": "",
"plain_text": "",
"subject": "Mail subject",
"sender_id": 132,
"sender_name": "John Doe",
"sender_email": "john.doe@example.com",
"time_to_send": "2017-09-13T08:59:31Z",
"lists": [
{
"hash": "hiso7tuNb4Z",
"name": "My list"
}
],
"type": 1,
"preview_url": "https://api.getanewsletter.com/v3/preview_mail/1/?public_key=12345678910",
"css": "",
"mail": 1,
"test": false,
"tell_a_friend": "12345678920",
"tracking": [
{
"params": {
"utm_campaign": "cmp_123456",
"utm_medium": "email",
"utm_source": "getanewsletter"
},
"type": 0
}
],
"report_url": "https://api.getanewsletter.com/v3/reports/123456/",
"report_id": 123456,
"updated": "2017-09-13T08:59:31Z",
"share_url": "http://gantrack.com/t/pm/12345678910/"
}
DELETE /mails/sent/<id>/
Deletes the mail. (not the queue object)
Example:
DELETE /mails/sent/4/
Response
Status 204 No Content