Delete attachments of a campaign message. Only applicable for campaign message of type email
1 min
DELETE
https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message/attachments
Path Parameters
- clientIdinteger<int64>requiredDescriptionFormatint64
- transactionalMailIdinteger<int64>requiredDescriptionFormatint64
Query Parameters
- attachmentIdsinteger[]requiredDescription
Responses
204
400
404
405
curl
curl --request DELETE \
--url 'https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message/attachments?attachmentIds=array' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message/attachments?attachmentIds=array", 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}/transactionalmail/{transactionalMailId}/message/attachments?attachmentIds=array")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.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}/transactionalmail/{transactionalMailId}/message/attachments?attachmentIds=array"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
204
// The attachments were successfully deleted from campaign message.
400
// The "attachmentIds" parameter is empty, or the campaign mailing is of type FAX.
404
// The campaign mailing was not found.
405
// The campaign message is not of type EMAIL.