Get the content of a mailing (email)
1 min
GET
https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/messages/{mailingId}/content
Path Parameters
- clientIdstringrequiredDescription
- mailingIdinteger<int64>requiredDescriptionFormatint64
- campaignIdinteger<int64>requiredDescriptionFormatint64
Query Parameters
- sourcestringDefaultmessageAllowedEDITORMESSAGE
Header Parameters
- AcceptstringDescription
Responses
200
404
406
curl
curl --request GET \
--url 'https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/messages/{mailingId}/content?source=message' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/messages/{mailingId}/content?source=message", 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}/smartcampaigns/{campaignId}/messages/{mailingId}/content?source=message")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.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}/smartcampaigns/{campaignId}/messages/{mailingId}/content?source=message"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// The content of the mailing (in the indicated content type) was retrieved successfully.
404
// No content could be found for the indicated content type. Ensure that the "Accept" parameter has the correct content type and the content exists.
406
// The content type is not supported. Ensure that the "Accept" parameter has the correct content type.