Add multiple recipients to a recipient list. Double opt-in processes will not be overwritten by other opt-in processes (see <a href="https://support.optimizely.com/hc/en-us/articles/4413192291981#prioritization">Opt-in documentation</a>).
1 min
PUT
https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}
Path Parameters
- clientIdinteger<int64>requiredDescriptionFormatint64
- recipientListIdinteger<int64>requiredDescriptionFormatint64
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/jsonapplication/vnd.optivo.broadmail.v1+json
Body Parameters
- bodyCreateRecipientsRequestData
- recipientsExtendedRecipient[]
- addressstring
- datamap<string, object>
- idstring
- optinProcessIdinteger<int64>Formatint64
Responses
200
- RestRecipientsCreationModify
- countinteger<int32>Formatint32
- failedIdsstring[]
409
curl
curl --request PUT \
--url https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'PUT',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
200
// Adding recipients was initiated successfully.
{
"count": "",
"failedIds": [
""
]
}409
// The indicated opt-in process is not suitable for adding recipients.