Create or update a "Recipients" node
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/recipientLists
Path Parameters
- clientIdstringrequiredDescription
- transactionalMailIdinteger<int64>requiredDescriptionFormatint64
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/jsonapplication/vnd.optivo.broadmail.v1+json
Form Parameters
- recipientListIdsinteger[]requiredDescription
- successorNodeIdstringDescription
Responses
200
- RestRecipientListsNode
- nodeIdstringDescription
- successorNodeIdstringDescription
- recipientListIdsinteger[]Description
- linksobject[]Description
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
- gridLocationPointDescription
- xinteger<int32>Formatint32
- yinteger<int32>Formatint32
201
404
curl
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/recipientLists \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'recipientListIds=array'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("recipientListIds", "array");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/recipientLists", 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}/transactionalmail/{transactionalMailId}/recipientLists")
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 = "recipientListIds=array"
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/recipientLists"
payload = 'recipientListIds=array'
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" node was updated successfully.
{
"nodeId": "",
"successorNodeId": "",
"recipientListIds": [
0
],
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
],
"gridLocation": {
"x": "",
"y": ""
}
}201
// The "Recipient" node was created successfully.
404
// The "Recipient" node could not be found. Ensure that the required parameters such as "campaignId" or "recipientListIds" are correct and the "Recipients" node exists.