getUnsubscribersList
- Print
- PDF
getUnsubscribersList
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Gets unsubscribed email addresses.
GET https://{endpoint}/unsubscribers
Request
Request Parameters
Parameter | Required | Type | Limitation | Description |
---|---|---|---|---|
startUtc | N | Long | Either startUtc or startDateTime must be specified. | Start date and time to search unsubscribed date and time (It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC). It has priority over the startDateTime value. |
startDateTime | N | String | Allowed date and time format ("yyyy-MM-dd", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss SSS"). | Start date and time in the allowed format (UTC+09:00). The startUtc value has priority over this value. |
endUtc | N | Long | Either endUtc or endDateTime must be specified. | End date and time to search unsubscribed date and time (It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC). It has priority over the endDateTime value. |
endDateTime | N | String | Allowed date and time format ("yyyy-MM-dd", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss SSS"). | End date and time in the allowed format (UTC+09:00). The endUtc value has priority over this value. |
emailAddress | N | String | Email address format | Unsubscribed email address |
isRegByManager | N | Boolean | Indicates whether it is added by the admin. | |
size | N | Integer | Default:10 | Number of records per page. |
page | N | Integer | Default:0 | Index of a page to receive results (0..N). |
sort | N | String | createUtc: Unsubscribed date, isRegByManager: Indicates whether it is added by the admin. | Sort by (format: property(,asc|desc)): Messages are sorted in ascending order (asc) by default; multiple fields can be used for sorting. |
Response
HTTP status code | Description |
---|---|
200 | Success |
400 | Authentication failed, invalid request. |
500 | Server error |
Example
Request Example
GET https://mail.apigw.ntruss.com/api/v1/unsubscribers?startDateTime=2018-11-01%2000:00&size=5&page=0&endDateTime=2019-02-20%2023:59
Response Example
{
"content":[
{
"address":"shin.xxx@gmail.com",
"blockDate":{
"utc":1546569106178,
"formattedDate":"2019-01-04",
"formattedDateTime":"2019-01-04 11:31:46 178"
},
"isRegByManager":false
},
{
"address":"shin.xxxx@navercorp.com",
"blockDate":{
"utc":1546569014158,
"formattedDate":"2019-01-04",
"formattedDateTime":"2019-01-04 11:30:14 158"
},
"isRegByManager":false
},
{
"address":"xxxxx@aaa.com",
"blockDate":{
"utc":1544603441295,
"formattedDate":"2018-12-12",
"formattedDateTime":"2018-12-12 17:30:41 295"
},
"isRegByManager":true
},
{
"address":"xxxxx@nnn.com",
"blockDate":{
"utc":1544603441295,
"formattedDate":"2018-12-12",
"formattedDateTime":"2018-12-12 17:30:41 295"
},
"isRegByManager":true
}
],
"totalElements":4,
"totalPages":1,
"last":true,
"numberOfElements":4,
"first":true,
"sort":[
{
"direction":"DESC",
"property":"createUtc",
"ignoreCase":false,
"nullHandling":"NATIVE",
"ascending":false,
"descending":true
}
],
"size":10,
"number":0
}
Properties
Property | Required | Type | Limitation | Description |
---|---|---|---|---|
totalElements | Y | Integer | Total number of records | |
totalPages | Y | Integer | Total number of pages | |
numberOfElements | Y | Integer | Number of records in the current page | |
first | Y | Boolean | Indicates whether it is the first page. | |
last | Y | Boolean | Indicates whether it is the last page. | |
number | Y | Integer | Index of the current page (starting from 0) | |
size | Y | Integer | Number of records per page | |
sort | Y | List<Sort> | Sort | |
content | N | List<UnsubscribeResponse> | Content |
Error Codes
HTTP status code | Return code | Response message |
---|---|---|
400 | 77101 | Error in login information |
400 | 77102 | BAD_REQUEST |
400 | 77103 | Resource not found |
403 | 77201 | No permissions |
403 | 77202 | No subscription |
405 | 77001 | METHOD_NOT_ALLOWED |
415 | 77002 | UNSUPPORTED_MEDIA_TYPE |
500 | 77301 | Default project not found |
500 | 77302 | Error in working with external system API |
500 | 77303 | Other INTERNAL_SERVER_ERROR |
Was this article helpful?