/schedules (POST)

Allows you to create single or recurrence schedule publication.

API Request Details

URL

/api/v1/ps/schedules

Request Type

POST

Sample Request

run now Payload:
{
  "action": "createScheduleAPI",
  "data": {
    "storyId": "3E100F05EA1BA331A6C42795CB535986",
    "scheduleName": "Test Schdule v1",
    "recurrenceType": 1,
    "scheduleMode": 0,
     "runNow":true,
    "addStoryLink": true,
    "fileFormat": "PDF",
    "emailSubject": "Test Subject 1",
    "emailMessage": "Hi Message",
    "deliveryOption": 0,
    "deliveryRule": 1,
    "views": [
      {
        "bookmarkId": "STORY",
        "viewName": "view 1",
        "filename": "Sample",
        "fileSettings": {
          "selectedStoryPages": [],
          "includeAppendix": true,
          "appendixIncludeDate": true,
          "resolution": "1920,1080",
          "includeComments": false,
          "pageSize": "Auto"
        },
        "destinations": {
          "email": {
            "extEmailUsr": [],
            "internalEmailUsr": [
              "QXZ28R6"
            ]
          }
        }
      }
    ]
  }
}
 
run later
 
{
  "action": "createScheduleAPI",
  "data": {
    "storyInfo": {
      "storyId": "<Enter the story id>"
    },
    "scheduleMode": "<For broadcasting enter 1, for bursting enter 2>",
    "scheduleName": "<Enter name of the schedule>",
    "recurrenceType": "<For a single schedule enter 1;  for a recurring schedule enter 2>",
    "runOnce": {
      "startDate": "sStartDate"
    },
    "addStoryLink": "<Enter ‘true’ if you want to add a link to the story and ‘false’ if you do not want to add a link to the story>",
    "fileFormat": "<Enter ‘PDF’ to share a PDF copy of the story or ‘PPT’ to share a PPT format of the story>",
    "emailSubject": "<Enter the subject of the email>",
    "emailMessage": "<Enter the body of the email>",
    "views": [
      {
        "bookmarkId": "STORY",
        "viewName": "<Enter the name of the View you’d like to share>",
        "filename": "<Enter the PPT or PDF file name>",
        "fileSettings": {
          "isGridPage": true,
          "selectedStoryPages": []
        },
        "destinations": {
          "email": {
            "extEmailUsr": [
              "<Enter the email address of the external user/s (ex:abc@gmail.com)>"
            ],
            "internalEmailUsr": [
              "<Enter the user ID or Team ID of the internal user/s>"
            ]
          }
        }
      }
    ],
    "deliveryRule": 1
  }
}
recurrence payload
 
{
  "action": "createScheduleAPI",
  "data": {
    "storyInfo": {
      "storyId": "<Enter the story id>"
    },
    "scheduleMode": "<For broadcasting enter 1, for bursting enter 2>",
    "scheduleName": "<Enter name of the schedule>",
    "recurrenceType": 2,
    "recurrence": [
      {
        "recurrenceMode": "<For hourly recurrence enter 2; for daily recurrence enter 3; for weekly recurrence enter 4 (to specify the day of the week, use true/false operators (ex: onMonday: true); for monthly recurrence enter 5>",
        "endModeRepetitions": "<You can use either endModeRepetitions or endModeDate. Specify the number of times you want the schedule to repeat using the corresponding number (ex: 2, for 2 repetitions of the schedule).>",
        "endModeDate": "<Specifiy UTC Date String for end date (ex:'2022-06-07T08:15:46.523Z') >",
        "onMonday": false,
        "onTuesday": false,
        "onWednesday": false,
        "onThursday": false,
        "onFriday": false,
        "onSaturday": false,
        "onSunday": false,
        "firstRun": "sStartDate"
      }
    ],
    "addStoryLink": "<Enter ‘true’ if you want to add a link to the story and ‘false’ if you do not want to add a link to the story>",
    "fileFormat": "<Enter ‘PDF’ to share a PDF copy of the story or ‘PPT’ to share a PPT format of the story>",
    "emailSubject": "<Enter the subject of the email>",
    "emailMessage": "<Enter the body of the email>",
    "views": [
      {
        "bookmarkId": "STORY",
        "viewName": "<Enter the name of the View you’d like to share>",
        "filename": "<Enter the PPT or PDF file name>",
        "fileSettings": {
          "isGridPage": true,
          "selectedStoryPages": []
        },
        "destinations": {
          "email": {
            "extEmailUsr": [
              "<Enter the email address of the external user/s (ex:abc@gmail.com)>"
            ],
            "internalEmailUsr": [
              "<Enter the user ID or Team ID of the internal user/s>"
            ]
          }
        }
      }
    ],
    "deliveryRule": 1
  }
}

Error Responses

Response Body

{
     status:"",
     message:"",
     errorDetails :{
         parameters : {}
     },
     hasError:false
 };