Start a Smart Campaign
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/start
Path Parameters
- clientIdstringrequiredDescription
- campaignIdinteger<int64>requiredDescriptionFormatint64
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/jsonapplication/vnd.optivo.broadmail.v1+json
Responses
200
- RestSmartCampaign
- idinteger<int64>DescriptionFormatint64
- namestringDescription
- mailingGroupIdinteger<int64>DescriptionFormatint64
- descriptionstringDescription
- statusstring<invalid | activationRequired | activated | canceled | paused | running | finished>DescriptionAllowedinvalidactivationRequiredactivatedcanceledpausedrunningfinished
- typestring<regular | event | confirmation>DescriptionAllowedregulareventconfirmation
- createdstring<date-time>DescriptionFormatdate-time
- modifiedstring<date-time>DescriptionFormatdate-time
- startedstring<date-time>DescriptionFormatdate-time
- finishedstring<date-time>DescriptionFormatdate-time
- linksobject[]
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
- recipientListsRestRecipientListsNode
- nodeIdstringDescription
- successorNodeIdstringDescription
- recipientListIdsinteger[]Description
- linksobject[]Description
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
- gridLocationPointDescription
- xinteger<int32>Formatint32
- yinteger<int32>Formatint32
- targetGroupsRestTargetGroupNode[]
- nodeIdstringDescription
- successorNodeIdstringDescription
- namestringDescription
- targetGroupFilter
- namestring
- linksobject[]Description
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
- gridLocationPointDescription
- xinteger<int32>Formatint32
- yinteger<int32>Formatint32
- messagesRestMessageNode[]
- nodeIdstringDescription
- namestringDescription
- mailingIdinteger<int64>DescriptionFormatint64
- descriptionstringDescription
- mediaTypestringDescription
- statusstring<invalid | activationRequired | activated | canceled | paused | running | finished>DescriptionAllowedinvalidactivationRequiredactivatedcanceledpausedrunningfinished
- createdstring<date-time>DescriptionFormatdate-time
- modifiedstring<date-time>DescriptionFormatdate-time
- startedstring<date-time>DescriptionFormatdate-time
- finishedstring<date-time>DescriptionFormatdate-time
- senderAddressstringDescription
- senderNamestringDescription
- replyToAddressstringDescription
- replyToNamestringDescription
- subjectmap<string, string>
- mediaCodestringDescription
- formatstringDescription
- dispatchOptionstringDescription
- dispatchStrategyOptionstringDescription
- accumulateMessagesForDaysinteger<int32>DescriptionFormatint32
- pushTypestring<MOBILE | WEB>DescriptionAllowedMOBILEWEB
- iconstringDescription
- clickActionstringDescription
- archiveEnabledbooleanDescription
- archivePeriodstring<ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR | TWO_YEARS>DescriptionAllowedONE_MONTHTWO_MONTHSTHREE_MONTHSSIX_MONTHSONE_YEARTWO_YEARS
- smsPartsinteger<int32>DescriptionFormatint32
- deeplinksmap<string, string>Description
- linksobject[]Description
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
- contentstringDescription
- payloadmap<string, string>Description
- contentTypeobjectDescription
- typestring
- subtypestring
- parametersmap<string, string>
- wildcardTypeboolean
- wildcardSubtypeboolean
- expirystring<date-time>DescriptionFormatdate-time
- attachmentIdsinteger[]Description
- gridLocationPointDescription
- xinteger<int32>Formatint32
- yinteger<int32>Formatint32
- messageRestMessageNode
- nodeIdstringDescription
- namestringDescription
- mailingIdinteger<int64>DescriptionFormatint64
- descriptionstringDescription
- mediaTypestringDescription
- statusstring<invalid | activationRequired | activated | canceled | paused | running | finished>DescriptionAllowedinvalidactivationRequiredactivatedcanceledpausedrunningfinished
- createdstring<date-time>DescriptionFormatdate-time
- modifiedstring<date-time>DescriptionFormatdate-time
- startedstring<date-time>DescriptionFormatdate-time
- finishedstring<date-time>DescriptionFormatdate-time
- senderAddressstringDescription
- senderNamestringDescription
- replyToAddressstringDescription
- replyToNamestringDescription
- subjectmap<string, string>
- mediaCodestringDescription
- formatstringDescription
- dispatchOptionstringDescription
- dispatchStrategyOptionstringDescription
- accumulateMessagesForDaysinteger<int32>DescriptionFormatint32
- pushTypestring<MOBILE | WEB>DescriptionAllowedMOBILEWEB
- iconstringDescription
- clickActionstringDescription
- archiveEnabledbooleanDescription
- archivePeriodstring<ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR | TWO_YEARS>DescriptionAllowedONE_MONTHTWO_MONTHSTHREE_MONTHSSIX_MONTHSONE_YEARTWO_YEARS
- smsPartsinteger<int32>DescriptionFormatint32
- deeplinksmap<string, string>Description
- linksobject[]Description
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
- contentstringDescription
- payloadmap<string, string>Description
- contentTypeobjectDescription
- typestring
- subtypestring
- parametersmap<string, string>
- wildcardTypeboolean
- wildcardSubtypeboolean
- expirystring<date-time>DescriptionFormatdate-time
- attachmentIdsinteger[]Description
- gridLocationPointDescription
- xinteger<int32>Formatint32
- yinteger<int32>Formatint32
409
curl
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/start \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/start", 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}/start")
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/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/start"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The Smart Campaign was started successfully.
{
"id": "",
"name": "",
"mailingGroupId": "",
"description": "",
"status": "",
"type": "",
"created": "",
"modified": "",
"started": "",
"finished": "",
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
],
"recipientLists": {
"nodeId": "",
"successorNodeId": "",
"recipientListIds": [
0
],
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
],
"gridLocation": {
"x": "",
"y": ""
}
},
"targetGroups": [
{
"nodeId": "",
"successorNodeId": "",
"name": "",
"targetGroup": {
"name": ""
},
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
],
"gridLocation": {
"x": "",
"y": ""
}
}
],
"messages": [
{
"nodeId": "",
"name": "",
"mailingId": "",
"description": "",
"mediaType": "",
"status": "",
"created": "",
"modified": "",
"started": "",
"finished": "",
"senderAddress": "",
"senderName": "",
"replyToAddress": "",
"replyToName": "",
"subject": "",
"mediaCode": "",
"format": "",
"dispatchOption": "",
"dispatchStrategyOption": "",
"accumulateMessagesForDays": "",
"pushType": "",
"icon": "",
"clickAction": "",
"archiveEnabled": false,
"archivePeriod": "",
"smsParts": "",
"deeplinks": "",
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
],
"content": "",
"payload": "",
"contentType": {
"type": "",
"subtype": "",
"parameters": "",
"wildcardType": false,
"wildcardSubtype": false
},
"expiry": "",
"attachmentIds": [
0
],
"gridLocation": {
"x": "",
"y": ""
}
}
],
"message": {
"nodeId": "",
"name": "",
"mailingId": "",
"description": "",
"mediaType": "",
"status": "",
"created": "",
"modified": "",
"started": "",
"finished": "",
"senderAddress": "",
"senderName": "",
"replyToAddress": "",
"replyToName": "",
"subject": "",
"mediaCode": "",
"format": "",
"dispatchOption": "",
"dispatchStrategyOption": "",
"accumulateMessagesForDays": "",
"pushType": "",
"icon": "",
"clickAction": "",
"archiveEnabled": false,
"archivePeriod": "",
"smsParts": "",
"deeplinks": "",
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
],
"content": "",
"payload": "",
"contentType": {
"type": "",
"subtype": "",
"parameters": "",
"wildcardType": false,
"wildcardSubtype": false
},
"expiry": "",
"attachmentIds": [
0
],
"gridLocation": {
"x": "",
"y": ""
}
}
}409
// The Smart Campaign could not be started because it must be in status "Activation required", "New" or "Sending paused".