---
title: Update a recipient ID
slug: campaign/api/update-a-recipient-id
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "mYg_Qb10TbKBkkfvqtXMg",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid"
      }
    ],
    "name": "Update a recipient ID",
    "description": "",
    "contentType": "application/x-www-form-urlencoded",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "integer<int64>",
          "description": "Client ID",
          "format": "int64"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "newRecipientId",
          "kind": "required",
          "type": "string",
          "description": "New recipient ID"
        },
        {
          "name": "recipientId",
          "kind": "required",
          "type": "string",
          "description": "<p>Recipient ID (usually the email address)</p>"
        }
      ],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The recipient ID was updated successfully.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Recipient ID update is not possible because of a general error.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "TnC-C39I8A5DmP0z69Jvl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/x-www-form-urlencoded' \\\n     --data 'newRecipientId=string' \\\n     --data 'recipientId=string'"
        },
        {
          "id": "cuKkOFwoZwPVWJW4e_o5P",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/x-www-form-urlencoded\");\n\nvar urlencoded = new URLSearchParams();\nurlencoded.append(\"newRecipientId\", \"string\");\nurlencoded.append(\"recipientId\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: urlencoded,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "P6AD8YwMGjTpymXY3LXAz",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid\")\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/x-www-form-urlencoded\"\nrequest.body = \"newRecipientId=string&recipientId=string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "OWgFDyP_DJG7UhFFLaL9r",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid\"\n\npayload = 'newRecipientId=string&recipientId=string'\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/x-www-form-urlencoded'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "TnC-C39I8A5DmP0z69Jvl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The recipient ID was updated successfully.\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Recipient ID update is not possible because of a general error.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}