- 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
Unsubscriptions
The unsubscription object gives you information about which contacts has unsubscribed from a certain list.
Renders: [application/json, text/html, application/xml]
Parses: [application/json, application/x-www-form-urlencoded, multipart/form-data]
Optional fields
reason
Readonly fields
url
contact
contact_url
created
reason_display
Example unsubscription
{
"url": "https://api.getanewsletter.com/v3/reports/123/unsubscribed/43/",
"contact": "john.doe@example.com",
"contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
"created": "2013-08-27T14:28:08.744Z"
}
GET /reports/<report_id>/unsubscribed/
Responds with a list of unsubscriptions, like usual we provide next
, prev
, count
and the results
Possible url parameters are:
- page:
<int>
Example:
GET /reports/123/unsubscribed/
{
"count": 46,
"next": "https://api.getanewsletter.com/v3/reports/unsubscribed/?page=3",
"previous": "https://api.getanewsletter.com/v3/reports/unsubscribed/?page=2",
"results": [
{
"url": "https://api.getanewsletter.com/v3/reports/123/unsubscribed/43/",
"contact": "john.doe@example.com",
"contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
"created": "2013-08-27T14:28:08.744Z"
},
...
]
}
GET /reports/<report_id>/unsubscribed/<id>/
Responds with an unsubscription.
Example:
GET '/reports/123/unsubscribed/43/
{
"url": "https://api.getanewsletter.com/v3/reports/123/unsubscribed/43/",
"contact": "john.doe@example.com",
"contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
"created": "2013-08-27T14:28:08.744Z"
}
Exporting unsubscribed
GET /reports/<report_id>/unsubscribed/export/
Possible url parameters are:
- csv:
<0|1>
If the csv
parameter is not provided the API automatically returns xls-file for all exports under 64 000 rows, and with csv-file for bigger.
The export includes the email of the unsubscribed contact and the time when they unsubscribed.