---
title: Delete recipients from a recipient list
slug: campaign/api/delete-recipients-from-a-recipient-list
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "SAxJBnKLdBvaLjywCh-Dp",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}"
      }
    ],
    "name": "Delete recipients from a recipient list",
    "description": "<p>Delete multiple recipients from a recipient list. Note: All recipients are deleted if neither \"recipientIds\" nor \"removalType\" is specified.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "integer<int64>",
          "description": "Client ID",
          "format": "int64"
        },
        {
          "kind": "required",
          "name": "recipientListId",
          "type": "integer<int64>",
          "description": "Recipient list ID",
          "format": "int64"
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "recipientIds",
          "type": "array",
          "description": "<p>Comma-separated list of recipient IDs. Cannot be combined with 'removalType' parameter.</p>",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "removalType",
          "type": "string",
          "description": "Specifies the recipients to be removed. Cannot be combined with 'recipientIds' parameter.",
          "enum": [
            "blacklisted",
            "bounced",
            "unsubscribed"
          ]
        },
        {
          "kind": "optional",
          "name": "mediaType",
          "type": "string",
          "description": "<p>Filter recipients for a given type (can only be used with 'removalType' parameter)</p>",
          "enum": [
            "EMAIL",
            "FAX",
            "SMS",
            "LETTER",
            "PUSH",
            "PRINT"
          ]
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "The deletion was initiated successfully.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "The parameters \"recipientIds\" and \"removalType\" were added simultaneously. Provide either \"recipientIds\" or \"removalType\" parameter.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "wQOVuUZLtgyVAp-afi0we",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "LyLCsvr5bBCyqwC7Nn1Y_",
          "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: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "dWNEeHFDWrep3wIzu5Ymv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5INbcf9_NnXB_qG-8J4f0",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "wQOVuUZLtgyVAp-afi0we"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// The deletion was initiated successfully.\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// The parameters \"recipientIds\" and \"removalType\" were added simultaneously. Provide either \"recipientIds\" or \"removalType\" parameter.\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}