- 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
Lists
The list object is a collection of contacts. You can group contacts into different lists to make it possible to send different newsletters to different groups of contacts.
Renders: [application/json, text/html, application/xml]
Parses: [application/json, application/x-www-form-urlencoded, multipart/form-data]
Required fields
name
Optional fields
description
Readonly fields
url
hash
active_subscribers_count
active_sms_subscribers_count
subscribers_count
created
subscribers
responders_count
responders
Example list
{
"url": "https://api.getanewsletter.com/v3/lists/hiso7tuNb4Z/",
"hash": "hiso7tuNb4Z",
"name": "Standard list",
"active_subscribers_count": 2,
"subscribers_count": 4,
"description": "A list where you can collect yor subscribers",
"created": "2013-08-26T09:23:47Z",
"subscribers": "https://api.getanewsletter.com/v3/lists/hiso7tuNb4Z/subscribers/",
"responders_count": 0,
"responders": []
}
GET /lists/
Responds with a list of lists, like usual we provide next
, prev
, count
and the results
Possible url parameters are:
- page:
<int>
Example:
{
"count": 46,
"next": "https://api.getanewsletter.com/v3/lists/?page=3,
"previous": "https://api.getanewsletter.com/v3/lists/?page=2,
"results": [
{
"url": "https://api.getanewsletter.com/v3/lists/hiso7tuNb4Z/",
"hash": "hiso7tuNb4Z",
"name": "Standard list",
"active_subscribers_count": 2,
"description": "A list where you can collect yor subscribers",
"created": "2013-08-26T09:23:47Z",
"subscribers": "https://api.getanewsletter.com/v3/lists/hiso7tuNb4Z/subscribers/",
"responders_count": 0
},
...
]
}
POST /lists/
Creates a new list. The only required parameters is name
.
Example:
POST /lists/
{
"name": "My new list",
}
Response
{
"url": "https://api.getanewsletter.com/v3/lists/pcbe1/",
"hash": "pcbe1",
"name": "My new list",
"active_subscribers_count": 0,
"subscribers_count": 0,
"description": "",
"created": "2013-08-30T13:42:53.409Z",
"subscribers": "https://api.getanewsletter.com/v3/lists/pcbe1/subscribers/",
"responders_count": 0,
"responders": []
}
Location: https://api.getanewsletter.com/v3/lists/pcbe1/
PUT /lists/<hash>/
Update or create a list, if the list doesn't exist it's created.
Status code is 200
if the list is updated and 201
if it's created
Example:
PUT /lists/hiso7tuNb4Z/
{
"name": "My new list",
}
Response
{
"url": "https://api.getanewsletter.com/v3/lists/oDgEyeHcd2Tb/",
"hash": "oDgEyeHcd2Tb",
"name": "My new list",
"active_subscribers_count": 0,
"subscribers_count": 0,
"description": "",
"created": "2013-08-30T13:42:02Z",
"subscribers": "https://api.getanewsletter.com/v3/lists/oDgEyeHcd2Tb/subscribers/",
"responders_count": 0,
"responders": []
},
200 Updated
PATCH /lists/<hash>/
Patch is used for partial updates. You can update name
.
Example:
PATCH /lists/hiso7tuNb4Z/
{
"name": "My awesome list"
}
{
"url": "https://api.getanewsletter.com/v3/lists/oDgEyeHcd2Tb/",
"hash": "oDgEyeHcd2Tb",
"name": "My awesome list",
"active_subscribers_count": 0,
"subscribers_count": 0,
"description": "",
"created": "2013-08-30T13:42:02Z",
"subscribers": "https://api.getanewsletter.com/v3/lists/oDgEyeHcd2Tb/subscribers/",
"responders_count": 0,
"responders": []
}
200 OK
DELETE /lists/<hash>/
Deletes the list.
Example:
DELETE /list/hiso7tuNb4Z/
Response
Status 204 No Content