getMailList
- Print
- PDF
getMailList
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Querying a list of emails created via a specific requestId of a send request
GET https://{endpoint}/mails/requests/{requestId}/mails
Requests
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
requestId | Yes | String | Included in URL path | requestId of email send request (Identifier for each request; a requestId can include multiple mailIds if a request is made to send multiple emails simultaneously.) |
mailId | No | String | Email ID (identifier for each email) | |
recipientAddress | No | String | Email address format | Recipient's email address |
title | No | String | “like” search support | Email subject |
sendStatus | No | List<String> | R: Ready, I: In transit, S: Sent, F: Failed, U: Unsubscribed, C: Canceled, PF: Partial failure | Email delivery status |
size | No | Integer | Default:10 | Number of records per page |
page | No | Integer | Default:0 | Page index (0 ... N) at which results will be received |
sort | No | String | id: mailId, createUtc: Creation date and time, statusCode: Delivery status | Sort-by field (format: property [,asc |
Responses
HTTP status code | Description |
---|---|
200 | Success |
400 | Authentication failed; bad request |
500 | Server error |
Examples
Request examples
GET https://mail.apigw.ntruss.com/api/v1/mails/requests/20181120000000010999/mails?size=5&sendStatus=S&sendStatus=PF&page=0
Response examples
{
"content": [
{
"requestId": "20181120000000010999",
"requestDate": {
"utc": 1542694793101,
"formattedDate": "2018-11-20",
"formattedDateTime": "2018-11-20 15:19:53 101"
},
"mailId": "20181120000000011009",
"title": "test!",
"templateSid": 41,
"templateName": "test2",
"emailStatus": {
"label": "Partial failure",
"code": "PF"
},
"senderAddress": "a@ac.om",
"senderName": "testUser",
"sendDate": {
"utc": 1542694793856,
"formattedDate": "2018-11-20",
"formattedDateTime": "2018-11-20 15:19:53 856"
},
"representativeRecipient": "test0@ncp-mail.com(30)",
"reservationStatus": {
"label": "Send immediately",
"code": "N"
},
"advertising": false
},
{
"requestId": "20181120000000010999",
"requestDate": {
"utc": 1542694793101,
"formattedDate": "2018-11-20",
"formattedDateTime": "2018-11-20 15:19:53 101"
},
"mailId": "20181120000000011109",
"title": "test!",
"templateSid": 41,
"templateName": "test2",
"emailStatus": {
"label": "Sent successfully",
"code": "S"
},
"senderAddress": "a@ac.om",
"senderName": "testUser",
"sendDate": {
"utc": 1542694793655,
"formattedDate": "2018-11-20",
"formattedDateTime": "2018-11-20 15:19:53 655"
},
"representativeRecipient": "test36@ncp-mail.com(12)",
"reservationStatus": {
"label": "Send immediately",
"code": "N"
},
"advertising": false
}
],
"last": true,
"totalElements": 2,
"totalPages": 1,
"first": true,
"numberOfElements": 2,
"sort": [
{
"direction": "DESC",
"property": "createUtc",
"ignoreCase": false,
"nullHandling": "NATIVE",
"ascending": false,
"descending": true
}
],
"size": 5,
"number": 0
}
Properties
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
totalElements | Yes | Integer | Total number of records | |
totalPages | Yes | Integer | Total number of pages | |
numberOfElements | Yes | Integer | Number of records on current page | |
first | Yes | Boolean | Indicates whether current page is the first page | |
last | Yes | Boolean | Indicates whether current page is the last page | |
number | Yes | Integer | Current page index (from 0) | |
size | Yes | Integer | Number of records per page | |
sort | Yes | List<Sort> | Sort | |
content | No | List<MailListResponse> | Details |
Errors
HTTP Status Code | Return code | Response message |
---|---|---|
400 | 77101 | Login information error |
400 | 77102 | BAD_REQUEST |
400 | 77103 | Resource does not exist |
403 | 77201 | No permission |
403 | 77202 | No prior request to subscribe to email service |
405 | 77001 | METHOD_NOT_ALLOWED |
415 | 77002 | UNSUPPORTED_MEDIA_TYPE |
500 | 77301 | Default project does not exist |
500 | 77302 | External system API linkage error |
500 | 77303 | Other INTERNAL_SERVER_ERROR |
Was this article helpful?