Preview a Report Schedule
POST/print-mail/v1/reports/schedule_previews
Work out when a schedule would actually run, without saving anything. Takes the same
fields as the schedule on a report, plus an optional sqlQuery so you can check
whether that query is schedulable at all (a parameterized query is not).
Body ParametersJSON
dayOfMonth: optional number
Monthly and yearly schedules only. Monthly schedules are capped at 28
so a run never skips a short month.
formatint32
minimum1
maximum31
dayOfWeek: optional number
Weekly schedules only. 0 is Sunday through 6 for Saturday.
formatint32
minimum0
maximum6
month: optional number
Yearly schedules only. 0 is January through 11 for December.
formatint32
minimum0
maximum11
Preview a Report Schedule
curl https://api.postgrid.com/print-mail/v1/reports/schedule_previews \
-H 'Content-Type: application/json' \
-H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY" \
-d '{
"interval": 1,
"time": "20:29",
"unit": "h"
}'{
"frequency": "1w",
"nextRun": "2026-06-15T13:00:00Z",
"description": "Every week on Monday at 9:00 AM (America/Toronto)",
"firstRunLabel": "Monday, June 15, 2026 at 9:00 AM",
"dayOfMonth": 1,
"dayOfMonthOptions": [
{
"value": 1,
"label": "1st"
},
{
"value": 2,
"label": "2nd"
}
],
"queryHasParameters": false
}Returns Examples
{
"frequency": "1w",
"nextRun": "2026-06-15T13:00:00Z",
"description": "Every week on Monday at 9:00 AM (America/Toronto)",
"firstRunLabel": "Monday, June 15, 2026 at 9:00 AM",
"dayOfMonth": 1,
"dayOfMonthOptions": [
{
"value": 1,
"label": "1st"
},
{
"value": 2,
"label": "2nd"
}
],
"queryHasParameters": false
}