---
title: Send campaign to the chunked recipients
slug: campaign/api/send-campaign-to-the-chunked-recipients
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "hrDhM86LAc36ipVr20f8c",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}"
      }
    ],
    "name": "Send campaign to the chunked recipients",
    "description": "<p>Imports the recipients (chunked recipients can be provided with this call as well) and starts the campaign. The sending batch is marked as finished afterwards.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "number",
          "description": "Client ID"
        },
        {
          "kind": "required",
          "name": "sendingBatchId",
          "type": "number",
          "description": "Sending Batch ID"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "RecipientsChunkRequestData",
          "schema": [
            {
              "name": "chunk",
              "kind": "optional",
              "type": "string",
              "description": ""
            },
            {
              "name": "recipients",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/Recipient",
              "customType": "Recipient[]",
              "schema": [
                {
                  "name": "data",
                  "kind": "optional",
                  "type": "map",
                  "description": "",
                  "example": "",
                  "customType": "map<string, object>",
                  "schema": []
                },
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/RecipientsChunkRequestData",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "202",
        "description": "<p>The import of recipients is initiated, the campaign will be started after import is finished.</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "<p>Chunk value is not alphanumeric (with '-' and '_' accepted) or not limited with 250 characters.</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "The sending batch could not be found. Ensure that the required parameter is correct and the sending batch entry exists.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "409",
        "description": "",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "cs7XW_F9C8G3ic8Wp1tug",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "zP77g8zjFVpLXokCv0tN9",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vBOUzVKctP8_lXleKyFvs",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "iJ-8YkR0MFm9Q6E2jg18z",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "cs7XW_F9C8G3ic8Wp1tug"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-202",
          "language": "202",
          "code": "// The import of recipients is initiated, the campaign will be started after import is finished.\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Chunk value is not alphanumeric (with '-' and '_' accepted) or not limited with 250 characters.\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// The sending batch could not be found. Ensure that the required parameter is correct and the sending batch entry exists.\n"
        },
        {
          "id": "response-3-409",
          "language": "409",
          "code": ""
        }
      ],
      "selectedLanguageId": "response-0-202"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}