Create an Email or Push campaign schedule

post

/rest/api/v1.3/campaigns/{campaignName}/schedule

Request

Path Parameters
Body ()
Request Body
Root Schema : Email or Push Campaign Schedule
Type: object
Title: Email or Push Campaign Schedule
Show Source
Nested Schema : launchOptions
Type: object
Launch Options for the schedule.
Show Source
Nested Schema : progressEmailAddresses
Type: array
Email addresses to inform of progress.
Show Source
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Email or Push Campaign Schedule
Type: object
Title: Email or Push Campaign Schedule
Show Source
Nested Schema : launchOptions
Type: object
Launch Options for the schedule.
Show Source
Nested Schema : progressEmailAddresses
Type: array
Email addresses to inform of progress.
Show Source
Back to Top

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.

REQUEST NOTES
  • 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)
RESPONSE 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

Email proof launch scheduling 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 November 16, 2018. 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": "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

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
  }
}

Response example: 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": "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

In this example, we are scheduling a campaign launch for December 30, 2018 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": "2018-12-30 11:17 AM",
  "launchOptions": {
    "proofLaunch": false,
    "progressEmailAddresses": [
      "email1@ora.com",
      "email2@ora.com"],
    "progressChunk": "CHUNK_10K"
  }
}

Sample Response: 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": "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

In this example, we are scheduling a campaign launch for December 30, 2018 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": "2018-12-30 11:17 AM",
   "launchOptions": {
      "progressEmailAddresses": ["email1@ora.com", "email2@ora.com"],
      "progressChunk": "CHUNK_10K"
   }
} 

Sample Response Body ? Push

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": "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"
    }
  ]
}
Back to Top