Create an Email or Push campaign schedule
/rest/api/v1.3/campaigns/{campaignName}/schedule
Request
-
campaignName: string
Campaign Name
object
Email or Push Campaign Schedule
-
launchOptions(optional):
object launchOptions
Launch Options for the schedule.
-
recurringEndTime(optional):
string
Date in the format yyyy-mm-dd HH:mm
-
scheduledTime:
string
Date in the format yyyy-mm-dd HH:mm
-
scheduleType:
string
Allowed Values:
[ "NOW", "ONCE" ]
Schedule Type.
object
-
progressChunk(optional):
string
Allowed Values:
[ "CHUNK_10K", "CHUNK_50K", "CHUNK_100K", "CHUNK_500K", "CHUNK_1M" ]
Progress Chunk. -
progressEmailAddresses(optional):
array progressEmailAddresses
Email addresses to inform of progress.
-
proofLaunch(optional):
boolean
Should a proof launch be performed.
-
proofLaunchEmail(optional):
string
Email address for the proof launch.
-
proofLaunchType(optional):
string
Allowed Values:
[ "LAUNCH_TO_ADDRESS", "LAUNCH_TO_PROOFLIST", "LAUNCH_TO_ADDRESS_USING_PROOFLIST" ]
Proof Launch type. -
recipientLimit(optional):
integer
Recipient Limit.
-
samplingNthInterval(optional):
integer
Sampling Interval.
-
samplingNthOffset(optional):
integer
Sampling offset.
-
samplingNthSelection(optional):
integer
Sampling Selection.
array
Response
- application/json
Default Response
object
Email or Push Campaign Schedule
-
id(optional):
string
ID of the schedule.
-
launchOptions(optional):
object launchOptions
Launch Options for the schedule.
-
recurringEndTime(optional):
string
Date in the format yyyy-mm-dd HH:mm
-
scheduledTime(optional):
string
Date in the format yyyy-mm-dd HH:mm
-
scheduleType(optional):
string
Allowed Values:
[ "NOW", "ONCE" ]
Schedule Type.
object
-
progressChunk(optional):
string
Allowed Values:
[ "CHUNK_10K", "CHUNK_50K", "CHUNK_100K", "CHUNK_500K", "CHUNK_1M" ]
Progress Chunk. -
progressEmailAddresses(optional):
array progressEmailAddresses
Email addresses to inform of progress.
-
proofLaunch(optional):
boolean
Should a proof launch be performed.
-
proofLaunchEmail(optional):
string
Email address for the proof launch.
-
proofLaunchType(optional):
string
Allowed Values:
[ "LAUNCH_TO_ADDRESS", "LAUNCH_TO_PROOFLIST", "LAUNCH_TO_ADDRESS_USING_PROOFLIST" ]
Proof Launch type. -
recipientLimit(optional):
integer
Recipient Limit.
-
samplingNthInterval(optional):
integer
Sampling Interval.
-
samplingNthOffset(optional):
integer
Sampling offset.
-
samplingNthSelection(optional):
integer
Sampling Selection.
array
Examples
About the sample requests and responses
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.
- A Responsys user must create the campaign in Responsys, and the campaign must not have validation errors.
- For Email campaigns, the interfaces apply for only Email Message Designer (EMD) campaigns; the interfaces do not support classic campaigns.
- For Push campaigns, your Push campaign must have the "From address" set in the Launch Options of the campaign workbook. If the "From address" is not set, the campaign will be scheduled successfully, but the campaign launch will fail.
- The APIs support Push campaigns only for the Mobile App channel. The API does not support In-app Message campaigns.
A successful request requires the following headers:
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
Content-Type | application/json |
Required Request Body Parameters (Email, Push): The following parameters are the minimum required 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 AM or PM) launchOptions: progressEmailAddresses (one or more email addresses) progressChunk (CHUNK_10K, CHUNK_50K, CHUNK_100K, CHUNK_500K, or CHUNK_1M)
Required Request Body Parameters (Email proof launch):
scheduleType (ONCE or NOW) scheduledTime (Date 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)
- 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
Email proof launch scheduling examples
Sample Request Body: Email proof launch to an address
{ "scheduleType": "ONCE", "scheduledTime": "2018-11-16 06:00 AM", "launchOptions": { "proofLaunch": true, "proofLaunchEmail": "someemail@a.com", "proofLaunchType": "LAUNCH_TO_ADDRESS", "recipientLimit": 1, "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
recipientLimit
attribute.
{ "scheduleType": "NOW", "launchOptions": { "proofLaunch": true, "proofLaunchType" : "LAUNCH_TO_PROOFLIST", "recipientLimit": 2 } }
Response example: Email proof launch
POST
request endpoint was as follows, where
MyTestCampaign is the campaign name:
/rest/api/v1.3/campaigns/MyTestCampaign/schedule
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": "2018-11-16 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 launch scheduling example
Sample Request: Email
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": "2018-12-30 11:17 AM", "launchOptions": { "proofLaunch": false, "progressEmailAddresses": [ "email1@ora.com", "email2@ora.com"], "progressChunk": "CHUNK_10K" } }
Sample Response: Email
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": "2018-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 launch scheduling example
Sample Request: Push
POST /rest/api/v1.3/campaigns/JMP emailTest for API/schedule { "scheduleType": "ONCE", "scheduledTime": "2018-12-30 11:17 AM", "launchOptions": { "progressEmailAddresses": ["email1@ora.com", "email2@ora.com"], "progressChunk": "CHUNK_10K" } }
Sample Response Body ? Push
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": "2018-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" } ] }