getMailRequestList
- Print
- PDF
getMailRequestList
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Searches a list of emails requested to be sent.
GET https://{endpoint}/mails/requests
Request
Request parameters
Parameter name | Required status | Type | Restrictions | Description |
---|---|---|---|---|
startUtc | Conditional | Long | Either startUtc or startDateTime must be specified. | Request start date and time, which is the natural number of milliseconds (in 1/1000 seconds) that have elapsed since January 1, 1970 00:00:00 UTC. It has priority over the startDateTime value. |
startDateTime | Conditional | 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"). | Request start date and time in the allowed format (UTC+09:00). The startUtc value has priority over this value. |
endUtc | Conditional | Long | Either endUtc or endDateTime must be specified. | Request end date and time, which is the natural number of milliseconds (in 1/1000 seconds) that have elapsed since January 1, 1970 00:00:00 UTC. It has priority over the endDateTime value. |
endDateTime | Conditional | 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"). | Request end date and time in the allowed format (UTC+09:00). The endUtc value has priority over this value. |
requestId | No | String | Request ID to send an email (for identifying each request). If you make a request to send multiple messages at the same time, then the requestId can contain multiple mailIds. | |
mailId | No | String | Email ID (to identify each email) | |
dispatchType | No | String | CONSOLE, API | Email dispatch type |
title | No | String | Like search supported. | Email title |
templateSid | No | Integer | Template ID | |
senderAddress | No | String | Email address format | Sender's email address |
recipientAddress | No | String | Email address format | Recipient's email address |
sendStatus | No | List<String> | P: Preparing to send, I: Sending, S: Sent successfully, F: Failed to send, U: Unsubscribe, C: Cancel send, PF: Partially failed | Email delivery status |
size | No | Integer | Default:10 | Number of records per page |
page | No | Integer | Default:0 | Index of a page to receive results (0..N). |
sort | No | String | createUtc: Created date and time, recipientCount: Number of recipients, reservationUtc: Reserved date and time, sendUtc: Sent date and time, statusCode: Delivery status | 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 errors |
Example
Request example
GET https://mail.apigw.ntruss.com/api/v1/mails/requests?dispatchType=API&startDateTime=2018-11-01%2000:00&size=5&sendStatus=S&page=0&endDateTime=2018-11-20%2023:59
Response example
{
"content":[
{
"requestId":"20181120000000000299",
"requestDate":{
"utc":1542675575268,
"formattedDate":"2018-11-20",
"formattedDateTime":"2018-11-20 09:59:35 268"
},
"templateSid":null,
"templateName":null,
"emailStatus":{
"label":"Sent successfully",
"code":"S"
},
"senderAddress":"no_reply@domain.com",
"senderName":null,
"dispatchType":"API",
"elapsedTime":"00:00:05.230",
"sendDate":{
"utc":1542675580498,
"formattedDate":"2018-11-20",
"formattedDateTime":"2018-11-20 09:59:40 498"
},
"reservationDate":null,
"requestCount":100,
"recipientCount":100
},
{
"requestId":"20181113000000000499",
"requestDate":{
"utc":1542071645647,
"formattedDate":"2018-11-13",
"formattedDateTime":"2018-11-13 10:14:05 647"
},
"templateSid":null,
"templateName":null,
"emailStatus":{
"label":"Sent successfully",
"code":"S"
},
"senderAddress":"a@a.com",
"senderName":null,
"dispatchType":"API",
"elapsedTime":"00:00:00.475",
"sendDate":{
"utc":1542071646122,
"formattedDate":"2018-11-13",
"formattedDateTime":"2018-11-13 10:14:06 122"
},
"reservationDate":null,
"requestCount":1,
"recipientCount":1
},
{
"requestId":"20181113000000000299",
"requestDate":{
"utc":1542071618910,
"formattedDate":"2018-11-13",
"formattedDateTime":"2018-11-13 10:13:38 910"
},
"templateSid":null,
"templateName":null,
"emailStatus":{
"label":"Sent successfully",
"code":"S"
},
"senderAddress":"a@a.com",
"senderName":null,
"dispatchType":"API",
"elapsedTime":"00:00:02.142",
"sendDate":{
"utc":1542071621052,
"formattedDate":"2018-11-13",
"formattedDateTime":"2018-11-13 10:13:41 052"
},
"reservationDate":null,
"requestCount":1,
"recipientCount":1
},
{
"requestId":"20181109000063986599",
"requestDate":{
"utc":1541752179226,
"formattedDate":"2018-11-09",
"formattedDateTime":"2018-11-09 17:29:39 226"
},
"templateSid":13,
"templateName":"test",
"emailStatus":{
"label":"Sent successfully",
"code":"S"
},
"senderAddress":"no_reply@a.com",
"senderName":"test",
"dispatchType":"API",
"elapsedTime":"00:15:02.312",
"sendDate":{
"utc":1541753081538,
"formattedDate":"2018-11-09",
"formattedDateTime":"2018-11-09 17:44:41 538"
},
"reservationDate":null,
"requestCount":100000,
"recipientCount":100000
},
{
"requestId":"20181109000063886499",
"requestDate":{
"utc":1541752150850,
"formattedDate":"2018-11-09",
"formattedDateTime":"2018-11-09 17:29:10 850"
},
"templateSid":13,
"templateName":"test",
"emailStatus":{
"label":"Sent successfully",
"code":"S"
},
"senderAddress":"no_reply@a.com",
"senderName":"test",
"dispatchType":"API",
"elapsedTime":"00:00:17.004",
"sendDate":{
"utc":1541752167854,
"formattedDate":"2018-11-09",
"formattedDateTime":"2018-11-09 17:29:27 854"
},
"reservationDate":null,
"requestCount":1000,
"recipientCount":1000
}
],
"last":false,
"totalElements":21,
"totalPages":5,
"first":true,
"numberOfElements":5,
"sort":[
{
"direction":"DESC",
"property":"createUtc",
"ignoreCase":false,
"nullHandling":"NATIVE",
"ascending":false,
"descending":true
}
],
"size":5,
"number":0
}
Property
Category | Required status | Type | Restrictions | Description |
---|---|---|---|---|
totalElements | Yes | Integer | Total number of records | |
totalPages | Yes | Integer | Total number of pages | |
numberOfElements | Yes | Integer | Number of records in the current page | |
first | Yes | Boolean | Indicates whether this is the first page | |
last | Yes | Boolean | Indicates whether this is the last page | |
number | Yes | Integer | Index of the current page (starting from 0) | |
size | Yes | Integer | Number of records per page | |
sort | Yes | List<Sort> | Sort | |
content | No | List<RequestListResponse> | Details |
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 permission |
403 | 77202 | No request to subscribe the email product |
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?