getMailList
    • PDF

    getMailList

    • PDF

    Article Summary

    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 nameRequirement statusTypeRestrictionsDescription
    requestIdYesStringIncluded in URL pathrequestId of email send request (Identifier for each request; a requestId can include multiple mailIds if a request is made to send multiple emails simultaneously.)
    mailIdNoStringEmail ID (identifier for each email)
    recipientAddressNoStringEmail address formatRecipient's email address
    titleNoString“like” search supportEmail subject
    sendStatusNoList<String>R: Ready, I: In transit, S: Sent, F: Failed, U: Unsubscribed, C: Canceled, PF: Partial failureEmail delivery status
    sizeNoIntegerDefault:10Number of records per page
    pageNoIntegerDefault:0Page index (0 ... N) at which results will be received
    sortNoStringid: mailId, createUtc: Creation date and time, statusCode: Delivery statusSort-by field (format: property [,asc

    Responses

    HTTP status codeDescription
    200Success
    400Authentication failed; bad request
    500Server 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

    ItemRequirement statusTypeRestrictionsDescription
    totalElementsYesIntegerTotal number of records
    totalPagesYesIntegerTotal number of pages
    numberOfElementsYesIntegerNumber of records on current page
    firstYesBooleanIndicates whether current page is the first page
    lastYesBooleanIndicates whether current page is the last page
    numberYesIntegerCurrent page index (from 0)
    sizeYesIntegerNumber of records per page
    sortYesList<Sort>Sort
    contentNoList<MailListResponse>Details

    Errors

    HTTP Status CodeReturn codeResponse message
    40077101Login information error
    40077102BAD_REQUEST
    40077103Resource does not exist
    40377201No permission
    40377202No prior request to subscribe to email service
    40577001METHOD_NOT_ALLOWED
    41577002UNSUPPORTED_MEDIA_TYPE
    50077301Default project does not exist
    50077302External system API linkage error
    50077303Other INTERNAL_SERVER_ERROR

    Was this article helpful?

    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.