Schedule an Email or Push Campaign Launch
Use this interface to create a campaign launch schedule for an existing Email or Push campaign. You can schedule the campaign for immediate or future launch. You can also schedule launches for proof testing an existing Email campaign.
Service URL:
/rest/api/v1.3/campaigns/{campaignName}/schedule
Required Path Parameter:
campaignName
- Name of the campaign.
Request Method:
POST
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Required Request Body Parameters:
Minimum required attributes for Email and all required for Push:
scheduleType
(ONCE or NOW)scheduledTime
(Use when scheduleType=ONCE. Date must be in the format YYYY-MM-DD HH:MM xx, where xx is AM or PM)-
launchOptions
:progressEmailAddresses
(one or more email addresses)progressChunk
(CHUNK_10K, CHUNK_50K, CHUNK_100K, CHUNK_500K, or CHUNK_1M)
Attributes for Email proof launch:
scheduleType
(ONCE or NOW)scheduledTime
(Use when scheduleType=ONCE. Date must be in the format YYYY-MM-DD HH:MM xx, where xx is AM or PM)-
launchOptions
:proofLaunch
(true if a proof launch should be performed; otherwise false or omit)proofLaunchEmail
(Email address for the proof launch.)proofLaunchType
(LAUNCH_TO_ADDRESS or LAUNCH_TO_PROOFLIST or LAUNCH_TO_ADDRESS_USING_PROOFLIST)recipientLimit
(integer; recipient limit)samplingNthSelection
(integer; sampling selection)samplingNthOffset
(integer; sampling offset)samplingNthInterval
(integer; sampling interval)progressEmailAddresses
(one or more email addresses)progressChunk
(CHUNK_10K, CHUNK_50K, CHUNK_100K, CHUNK_500K, or CHUNK_1M)
Sample Requests and Responses
The following sections, Proof Email Examples, Email Examples, and Push Examples, show the sample request and response bodies for the different types of campaign scheduling.
NOTES:
- A success response returns the launch ID number, the scheduling attributes sent in the request, and the campaign-specific links for related API calls.
-
Error responses occur when:
- Scheduled date and time are in the past
- Campaign is already scheduled for launch at the requested date and time
- Invalid campaign
- Invalid parameters
- API user has insufficient access to launch a campaign
Proof Test Email Examples
Sample Request Body – Email proof launch to an address
In the following example request, the schedule launch request is for a single proof launch at 6:00 AM on May 25, 2019. The proof launch is to a single address, someemail@a.com. Launch progress emails will be sent to email1@a.com and email2@a.com.
{
"scheduleType": "ONCE",
"scheduledTime": "2019-05-25 06:00 AM",
"launchOptions": {
"proofLaunch": true,
"proofLaunchEmail": "someemail@a.com",
"proofLaunchType": "LAUNCH_TO_ADDRESS",
"recipientLimit": 3,
"samplingNthSelection": 1,
"samplingNthOffset": 1,
"samplingNthInterval": 1,
"progressEmailAddresses": [
"email1@a.com",
"email2@a.com"
],
"progressChunk": "CHUNK_10K"
}
}
Sample Request Body – Email proof launch to a proof list
You can also sent a proof launch to the proof list. In the following example, the proof test is scheduled for an immediate launch, and it will be sent to two recipients in the proof list associated to the campaign. You can set the number of recipients by using the recipientLimit attribute.
{
"scheduleType": "NOW",
"launchOptions": {
"proofLaunch": true,
"proofLaunchType" : "LAUNCH_TO_PROOFLIST",
"recipientLimit": 2
}
}
Sample Response Body – Email proof launch
In this example, the POST request endpoint was as follows, where MyTestCampaign is the campaign name: /rest/api/v1.3/campaigns/MyTestCampaign/schedule
The response returns a launch id (1), which you can use in other Launch Schedule requests (as shown in the links array), and it echoes back the attributes sent in the request. In this case, the response is for an email proof launch sent to an address.
{
"id": 1,
"scheduleType": "ONCE",
"scheduledTime": "2019-05-25 06:00 AM",
"launchOptions": {
"proofLaunch": true,
"proofLaunchEmail": "someemail@a.com",
"proofLaunchType": "LAUNCH_TO_ADDRESS,
"recipientLimit": 3,
"samplingNthSelection": 1,
"samplingNthOffset": 1,
"samplingNthInterval": 1,
"progressEmailAddresses": [
"email1@a.com",
"email2@a.com"
],
"progressChunk": "CHUNK_10K",
"links": [
{
"rel": "self",
"href": "/rest/api/v1.3/campaigns/MyTestCampaign/schedule",
"method": "POST"
},
{
"rel": "getSchedule",
"href": "/rest/api/v1.3/campaigns/MyTestCampaign/schedule/1",
"method": "GET"
},
{
"rel": "updateSchedule",
"href": "rest/api/v1.3/campaigns/MyTestCampaign/schedule/1",
"method": "PUT"
},
{
"rel": "deleteSchedule",
"href": "rest/api/v1.3/campaigns/MyTestCampaign/schedule/1",
"method": "DELETE"
}
]
}
Email Examples
Sample Request Body - Email
In this example, we are scheduling a campaign launch for December 30, 2019 at 11:17 AM of an EMD email campaign named JMP emailTest for API. Because proofLaunch is set to false, this is a campaign launch scheduled for the targeted recipients of the email campaign and not a proof launch.
POST /rest/api/v1.3/campaigns/JMP emailTest for API/schedule
{
"scheduleType": "ONCE",
"scheduledTime": "2019-12-30 11:17 AM",
"launchOptions": {
"proofLaunch": false,
"progressEmailAddresses": [
"email1@ora.com",
"email2@ora.com"],
"progressChunk": "CHUNK_10K"
}
}
Sample Response Body - Email
The response returns a launch id (244798), which you can use in other Launch Schedule requests (as shown in the links array), and it echoes back the attributes sent in the request. In this case, the response is for a live email campaign launch (not a proof launch) of JMP emailTest for API.
{
"id": 244798,
"scheduleType": "ONCE",
"scheduledTime": "2019-12-30 11:17 AM",
"launchOptions": {
"proofLaunch": false,
"progressEmailAddresses": [
"email1@ora.com",
"email2@ora.com"
],
"progressChunk": "CHUNK_10K"
},
"links": [
{
"rel": "self",
"href": "/rest/api/v1.3/campaigns/JMP emailTest for API/schedule",
"method": "POST"
},
{
"rel": "deleteSchedule",
"href": "/rest/api/v1.3/campaigns/JMP emailTest for API/schedule/244798",
"method": "DELETE"
},
{
"rel": "updateSchedule",
"href": "/rest/api/v1.3/campaigns/JMP emailTest for API/schedule/244798",
"method": "PUT"
},
{
"rel": "getSchedule",
"href": "/rest/api/v1.3/campaigns/JMP emailTest for API/schedule/244798",
"method": "GET"
}
]
}
Push Examples
Sample Request Body – Push
In this example, we are scheduling a campaign launch for December 30, 2019 at 11:17 AM of a Push campaign named JMP Test for API.
POST /rest/api/v1.3/campaigns/JMP emailTest for API/schedule
{
"scheduleType": "ONCE",
"scheduledTime": "2019-12-30 11:17 AM",
"launchOptions": {
"progressEmailAddresses": [
"email1@ora.com",
"email2@ora.com"
],
"progressChunk": "CHUNK_10K"
}
}
Sample Response Body – Email
The response returns a launch id (244797), which you can use in other Launch Schedule requests (as shown in the links array), and it echoes back the attributes sent in the request.
{
"id": 244797,
"scheduleType": "ONCE",
"scheduledTime": "2019-12-30 11:17 AM",
"launchOptions": {
"proofLaunch": false,
"progressEmailAddresses": [
"email1@ora.com",
"email2@ora.com"
],
"progressChunk": "CHUNK_10K"
},
"links": [
{
"rel": "self",
"href": "/rest/api/v1.3/campaigns/JMP Test for API/schedule",
"method": "POST"
},
{
"rel": "deleteSchedule",
"href": "/rest/api/v1.3/campaigns/JMP Test for API/schedule/244797",
"method": "DELETE"
},
{
"rel": "updateSchedule",
"href": "/rest/api/v1.3/campaigns/JMP Test for API/schedule/244797",
"method": "PUT"
},
{
"rel": "getSchedule",
"href": "/rest/api/v1.3/campaigns/JMP Test for API/schedule/244797",
"method": "GET"
}
]
}