Unsubscribes
Get information about list members who unsubscribed from a specific campaign.
Available methods
-
-
Get unsubscribed list members
GET /reports/{campaign_id}/unsubscribed
Get information about members who have unsubscribed from a specific campaign.
Path parameters
campaign_id |
The unique id for the campaign. |
Query string parameters
fields |
Type: Array |
Title: Fields |
Read only: false |
A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. |
exclude_fields |
Type: Array |
Title: Exclude Fields |
Read only: false |
A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. |
count |
Type: Integer |
Title: Count |
Read only: true |
The number of records to return. Default value is 10. |
offset |
Type: Integer |
Title: Offset |
Read only: false |
The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0. |
Response body parameters
unsubscribes |
Type: Array |
Title: Lists |
Read only: false |
An array of objects, each representing a member who unsubscribed from a campaign. |
Show properties
email_id |
Type: String |
Title: Email Hash |
Read only: true |
The MD5 hash of the lowercase version of the list member’s email address. |
email_address |
Type: String |
Title: Email Address |
Read only: true |
Email address for a subscriber. |
merge_fields |
Type: Object |
Title: Member Merge Var |
Read only: true |
An individual merge var and value for a member. |
vip |
Type: Boolean |
Title: VIP |
Read only: true |
VIP status for subscriber. |
timestamp |
Type: String |
Title: Timestamp |
Read only: true |
The date and time the member opted-out in ISO 8601 format. |
reason |
Type: String |
Title: Unsubscribe Reason |
Read only: true |
If available, the reason listed by the member for unsubscribing. |
campaign_id |
Type: String |
Title: Campaign ID |
Read only: true |
The campaign id. |
list_id |
Type: String |
Title: List ID |
Read only: true |
The list id. |
list_is_active |
Type: Boolean |
Title: List Status |
Read only: true |
The status of the list used, namely if it’s deleted or disabled. |
_links |
Type: Array |
Title: Links |
Read only: true |
A list of link types and descriptions for the API schema documents. |
Show properties
rel |
Type: String |
Title: Rel |
Read only: true |
As with an HTML ‘rel’ attribute, this describes the type of link. |
href |
Type: String |
Title: Href |
Read only: true |
This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action. |
method |
Type: String |
Title: Method |
Read only: true |
The HTTP method that should be used when accessing the URL defined in ‘href’.
Possible Values:
- GET
- POST
- PUT
- PATCH
- DELETE
- OPTIONS
- HEAD
|
targetSchema |
Type: String |
Title: Target Schema |
Read only: true |
For GETs, this is a URL representing the schema that the response should conform to. |
schema |
Type: String |
Title: Schema |
Read only: true |
For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to. |
|
|
campaign_id |
Type: String |
Title: Campaign ID |
Read only: true |
The campaign id. |
total_items |
Type: Integer |
Title: Item Count |
Read only: false |
The total number of items matching the query regardless of pagination. |
_links |
Type: Array |
Title: Links |
Read only: true |
A list of link types and descriptions for the API schema documents. |
Show properties
rel |
Type: String |
Title: Rel |
Read only: true |
As with an HTML ‘rel’ attribute, this describes the type of link. |
href |
Type: String |
Title: Href |
Read only: true |
This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action. |
method |
Type: String |
Title: Method |
Read only: true |
The HTTP method that should be used when accessing the URL defined in ‘href’.
Possible Values:
- GET
- POST
- PUT
- PATCH
- DELETE
- OPTIONS
- HEAD
|
targetSchema |
Type: String |
Title: Target Schema |
Read only: true |
For GETs, this is a URL representing the schema that the response should conform to. |
schema |
Type: String |
Title: Schema |
Read only: true |
For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to. |
|
Example request
curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/reports/8d6f39ce45/unsubscribed' \
--user 'anystring:apikey' \
--include
Example response
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json; charset=utf-8
Content-Length: 1263
Vary: Accept-Encoding
X-Request-Id: 47ae5490-18b4-4554-add7-6c9625f4f3aa
Link: <https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Collection.json>; rel="describedBy"
Date: Thu, 17 Sep 2015 17:49:55 GMT
Connection: keep-alive
{
"unsubscribes": [
{
"email_id": "62eeb292278cc15f5817cb78f7790b08",
"email_address": "urist.mcvankab@freddiesjokes.com",
"timestamp": "2015-09-17 17:47:33",
"reason": "",
"campaign_id": "8d6f39ce45",
"list_id": "57afe96172",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/reports/8d6f39ce45/unsubscribed",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Collection.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/reports/8d6f39ce45/unsubscribed/62eeb292278cc15f5817cb78f7790b08",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Instance.json"
},
{
"rel": "member",
"href": "https://usX.api.mailchimp.com/3.0/lists/57afe96172/members/62eeb292278cc15f5817cb78f7790b08",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Lists/Members/Instance.json"
}
]
}
],
"campaign_id": "",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/reports/8d6f39ce45",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Instance.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/reports/8d6f39ce45/unsubscribed",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Collection.json"
}
],
"total_items": 1
}
Error response
type |
Type: String |
Title: Problem Type |
Read only: false |
An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type. |
title |
Type: String |
Title: Error Title |
Read only: false |
A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization. |
status |
Type: Integer |
Title: HTTP Status Code |
Read only: false |
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem. |
detail |
Type: String |
Title: Error Message |
Read only: false |
A human-readable explanation specific to this occurrence of the problem. Learn more about errors. |
instance |
Type: String |
Title: Instance ID |
Read only: false |
A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support. |
Get information about a specific list member who unsubscribed
GET /reports/{campaign_id}/unsubscribed/{subscriber_hash}
Get information about a specific list member who unsubscribed from a campaign.
Path parameters
campaign_id |
The unique id for the campaign. |
subscriber_hash |
The MD5 hash of the lowercase version of the list member’s email address. |
Query string parameters
fields |
Type: Array |
Title: Fields |
Read only: false |
A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. |
exclude_fields |
Type: Array |
Title: Exclude Fields |
Read only: false |
A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. |
Response body parameters
email_id |
Type: String |
Title: Email Hash |
Read only: true |
The MD5 hash of the lowercase version of the list member’s email address. |
email_address |
Type: String |
Title: Email Address |
Read only: true |
Email address for a subscriber. |
merge_fields |
Type: Object |
Title: Member Merge Var |
Read only: true |
An individual merge var and value for a member. |
vip |
Type: Boolean |
Title: VIP |
Read only: true |
VIP status for subscriber. |
timestamp |
Type: String |
Title: Timestamp |
Read only: true |
The date and time the member opted-out in ISO 8601 format. |
reason |
Type: String |
Title: Unsubscribe Reason |
Read only: true |
If available, the reason listed by the member for unsubscribing. |
campaign_id |
Type: String |
Title: Campaign ID |
Read only: true |
The campaign id. |
list_id |
Type: String |
Title: List ID |
Read only: true |
The list id. |
list_is_active |
Type: Boolean |
Title: List Status |
Read only: true |
The status of the list used, namely if it’s deleted or disabled. |
_links |
Type: Array |
Title: Links |
Read only: true |
A list of link types and descriptions for the API schema documents. |
Show properties
rel |
Type: String |
Title: Rel |
Read only: true |
As with an HTML ‘rel’ attribute, this describes the type of link. |
href |
Type: String |
Title: Href |
Read only: true |
This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action. |
method |
Type: String |
Title: Method |
Read only: true |
The HTTP method that should be used when accessing the URL defined in ‘href’.
Possible Values:
- GET
- POST
- PUT
- PATCH
- DELETE
- OPTIONS
- HEAD
|
targetSchema |
Type: String |
Title: Target Schema |
Read only: true |
For GETs, this is a URL representing the schema that the response should conform to. |
schema |
Type: String |
Title: Schema |
Read only: true |
For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to. |
|
Example request
curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/reports/e6a3f74d09/unsubscribed/62eeb292278cc15f5817cb78f7790b08' \
--user 'anystring:apikey' \
--include
Example response
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json; charset=utf-8
Content-Length: 802
Vary: Accept-Encoding
X-Request-Id: f7862515-0809-4f2c-be52-e4c1fb9bf03a
Link: <https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Instance.json>; rel="describedBy"
Date: Thu, 17 Sep 2015 17:58:43 GMT
Connection: keep-alive
{
"email_id": "62eeb292278cc15f5817cb78f7790b08",
"email_address": "urist.mcvankab@freddiesjokes.com",
"timestamp": "2012-08-09 15:50:56",
"reason": "I no longer want to receive these emails",
"campaign_id": "e6a3f74d09",
"list_id": "d582598fd4",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/reports//unsubscribed",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Collection.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/reports//unsubscribed/62eeb292278cc15f5817cb78f7790b08",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Unsubs/Instance.json"
},
{
"rel": "member",
"href": "https://usX.api.mailchimp.com/3.0/lists/d582598fd4/members/62eeb292278cc15f5817cb78f7790b08",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Lists/Members/Instance.json"
}
]
}
Error response
type |
Type: String |
Title: Problem Type |
Read only: false |
An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type. |
title |
Type: String |
Title: Error Title |
Read only: false |
A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization. |
status |
Type: Integer |
Title: HTTP Status Code |
Read only: false |
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem. |
detail |
Type: String |
Title: Error Message |
Read only: false |
A human-readable explanation specific to this occurrence of the problem. Learn more about errors. |
instance |
Type: String |
Title: Instance ID |
Read only: false |
A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support. |