getMailRequestList
    • PDF

    getMailRequestList

    • PDF

    Article Summary

    Searches a list of emails requested to be sent.

    GET https://{endpoint}/mails/requests
    

    Request

    Request parameters

    Parameter nameRequired statusTypeRestrictionsDescription
    startUtcConditionalLongEither 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.
    startDateTimeConditionalStringAllowed 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.
    endUtcConditionalLongEither 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.
    endDateTimeConditionalStringAllowed 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.
    requestIdNoStringRequest 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.
    mailIdNoStringEmail ID (to identify each email)
    dispatchTypeNoStringCONSOLE, APIEmail dispatch type
    titleNoStringLike search supported.Email title
    templateSidNoIntegerTemplate ID
    senderAddressNoStringEmail address formatSender's email address
    recipientAddressNoStringEmail address formatRecipient's email address
    sendStatusNoList<String>P: Preparing to send, I: Sending, S: Sent successfully, F: Failed to send, U: Unsubscribe, C: Cancel send, PF: Partially failedEmail delivery status
    sizeNoIntegerDefault:10Number of records per page
    pageNoIntegerDefault:0Index of a page to receive results (0..N).
    sortNoStringcreateUtc: Created date and time, recipientCount: Number of recipients, reservationUtc: Reserved date and time, sendUtc: Sent date and time, statusCode: Delivery statusSort by (format: property (,asc|desc)): Messages are sorted in ascending order (asc) by default; multiple fields can be used for sorting.

    Response

    HTTP status codeDescription
    200Success
    400Authentication failed, invalid request.
    500Server 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

    CategoryRequired statusTypeRestrictionsDescription
    totalElementsYesIntegerTotal number of records
    totalPagesYesIntegerTotal number of pages
    numberOfElementsYesIntegerNumber of records in the current page
    firstYesBooleanIndicates whether this is the first page
    lastYesBooleanIndicates whether this is the last page
    numberYesIntegerIndex of the current page (starting from 0)
    sizeYesIntegerNumber of records per page
    sortYesList<Sort>Sort
    contentNoList<RequestListResponse>Details

    Error codes

    HTTP Status CodeReturn codeResponse message
    40077101Error in login information
    40077102BAD_REQUEST
    40077103Resource not found
    40377201No permission
    40377202No request to subscribe the email product
    40577001METHOD_NOT_ALLOWED
    41577002UNSUPPORTED_MEDIA_TYPE
    50077301Default project not found
    50077302Error in working with external system API
    50077303Other INTERNAL_SERVER_ERROR

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.