Update a recipient ID
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid
Path Parameters
- clientIdinteger<int64>requiredDescriptionFormatint64
Form Parameters
- newRecipientIdstringrequiredDescription
- recipientIdstringrequiredDescription
Responses
200
400
curl
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'newRecipientId=string' \
--data 'recipientId=string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("newRecipientId", "string");
urlencoded.append("recipientId", "string");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/x-www-form-urlencoded"
request.body = "newRecipientId=string&recipientId=string"
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.campaign.episerver.net/rest/{clientId}/recipients/updaterecipientid"
payload = 'newRecipientId=string&recipientId=string'
headers = {
'accept': 'application/json',
'content-type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The recipient ID was updated successfully.
400
// Recipient ID update is not possible because of a general error.