---
title: Get information about all archived mailings
slug: campaign/api/get-information-about-all-archived-mailings
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "9kpIPDrN2aiT4Neu3r1qK",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/mailarchive",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/mailarchive"
      }
    ],
    "name": "Get information about all archived mailings",
    "description": "<p>Get detailed information about all archived mailings, such as mailing type, mailingToUser ID and the date and time of creation.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "string",
          "description": "Client ID"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/vnd.optivo.broadmail.v1+json"
          ],
          "default": "application/json"
        },
        {
          "kind": "optional",
          "name": "next-cursor",
          "type": "string",
          "description": "Cursor to retrieve next batch. Cursor is going to expire after 10 minutes."
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "from",
          "type": "string",
          "description": "<p>Time filter to select archived mails created from date. DateTimeFormat 2021-11-07 17:43</p><div></div>. UTC Timezone will be used to parse the parameter<p></p>"
        },
        {
          "kind": "optional",
          "name": "bmMailIds",
          "type": "array",
          "description": "Collection of encoded mail IDs",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "optinStatus",
          "type": "string",
          "description": "<p>Double Opt-in status (Only for confirmation archived mails)</p>",
          "enum": [
            "non_confirmed",
            "confirmed"
          ]
        },
        {
          "kind": "optional",
          "name": "mailingId",
          "type": "integer<int64>",
          "description": "Mailing ID of archived mail",
          "format": "int64"
        },
        {
          "kind": "optional",
          "name": "recipientId",
          "type": "string",
          "description": "<p>Recipient ID (usually the email address)</p>"
        },
        {
          "kind": "optional",
          "name": "mailingTypes",
          "type": "string",
          "description": "<p>Collection of mailingTypes. Supported mailingTypes [event, transaction, confirmation, campaign]</p>"
        },
        {
          "kind": "optional",
          "name": "recipientAddress",
          "type": "string",
          "description": "<p>Recipient address (usually the email address)</p>"
        },
        {
          "kind": "optional",
          "name": "until",
          "type": "string",
          "description": "<p>Time filter to select archived mails created until date. DateTimeFormat 2021-11-07 17:43</p><div></div>. UTC Timezone will be used to parse the parameter<p></p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The information about the archived mailing was retrieved successfully.",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "next-cursor",
            "type": "integer",
            "description": "Cursor to retrieve next batch. Cursor is going to be expired after 10 minutes."
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "RestArchiveMail",
            "schema": [
              {
                "name": "mailingGroupId",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Client ID",
                "format": "int64"
              },
              {
                "name": "mailingType",
                "kind": "optional",
                "type": "string",
                "description": "Mailing type"
              },
              {
                "name": "mailingToUserId",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "MailingToUser ID",
                "format": "int64"
              },
              {
                "name": "properties",
                "kind": "optional",
                "type": "map",
                "description": "Metadata",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Date and time of creation",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/RestArchiveMail",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "204",
        "description": "Archived mailings could not be found.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "<p>Invalid request or 'next-cursor' is expired. Make sure you requested no more than 10000 results.</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "JmcQPqMBd2u20MmkvrRwq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.campaign.episerver.net/rest/{clientId}/mailarchive \\\n     --header 'accept: application/json'"
        },
        {
          "id": "IB0zuDjQ5kz35JuyVuLmZ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.campaign.episerver.net/rest/{clientId}/mailarchive\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "I9OYTYQaIz93eL6zF2G0D",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/mailarchive\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "MQ8uqkb9xBHDum26GyOPg",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/mailarchive\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "JmcQPqMBd2u20MmkvrRwq"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The information about the archived mailing was retrieved successfully.\n{\n  \"mailingGroupId\": \"\",\n  \"mailingType\": \"\",\n  \"mailingToUserId\": \"\",\n  \"properties\": \"\",\n  \"created\": \"\"\n}"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// Archived mailings could not be found.\n"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// Invalid request or 'next-cursor' is expired. Make sure you requested no more than 10000 results.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}