Creates a schedule, enabled. Cron is validated with its timezone.
name
stringrequired
Shown in the schedules list.
templateId
string (uuid)required
The template each run fills.
source
objectrequired
Where each run reads its rows: dataset, url or google_sheet.
type
stringrequired
dataset, url or google_sheet. Fill in the matching field.
datasetId
string (uuid)
For dataset: the stored dataset to read.
url
object
Rows fetched from a URL when the job (or each schedule run) starts.
url
stringrequired
An http or https URL. On a schedule it may use {{ run_date:yyyy-MM-dd }}, {{ previous_month }}, {{ year }}, {{ month }} and {{ day }}, worked out in the schedule's timezone.
format
stringdefault csv
csv, json or xlsx.
jsonRowsPath
string
For json: the dotted path to the array of rows, e.g. "data.items". The top level when left out.
sheetName
string
For xlsx: the worksheet to read; the first when left out.
headers
map of string
Extra request headers. Their values are never returned.
bearerToken
string
Write-only: sent as Authorization: Bearer, never returned. On a schedule update, leaving it out removes the stored token.
timeoutSeconds
integerdefault 30
How long to wait for the URL, 1 to 120 seconds; values outside are clamped.
googleSheet
object
A spreadsheet in a Google account the key's creator has connected in the app.
connectedAccountId
string (uuid)required
The Google account, from GET /workspace/connected-accounts.
spreadsheetId
stringrequired
The id in the sheet's URL, between /d/ and /edit.
sheetName
string
The tab to read; the first when left out.
firstRowHeaders
booleandefault true
The first row names the columns.
delivery
object
Where a job's documents go.
method
stringdefault download
download (the default), email, connected_email, webhook or storage. Email templates and combined jobs must use connected_email; anything else, the default included, is refused.
to
string
Recipients, comma-separated. On an email template it must be a column tag such as {{ Email }}. Ignored when `recipientListId` is set.
cc
string
Cc addresses, comma-separated; tags allowed on an email template.
subject
string
The email's subject. Tags allowed. On an email template it overrides the template's subject; for a PDF template it defaults to the template's name.
fromName
string
The sender name shown to recipients. Email templates and combined jobs only.
body
string
The email's text when a PDF template's documents are sent from a connected mailbox. Plain text.
recipientListId
string (uuid)
Send to every address on this saved list instead of `to`. PDF templates only.
ccRecipientListId
string (uuid)
Cc every address on this saved list instead of `cc`.
connectedAccountId
string (uuid)
Required for connected_email: the Gmail or Outlook mailbox to send from, one the key's creator connected (GET /workspace/connected-accounts).
endpointId
string (uuid)
Required for webhook: one of the workspace's webhook endpoints.
storageUrl
string
Required for storage: a pre-signed PUT URL the output is uploaded to. Never returned.
fileNamePattern
string
Names each PDF from its row, e.g. "Invoice-{{ InvoiceNumber }}". ".pdf" is added; a blank value falls back to the template name and row number.
cron
string
5-part cron, e.g. "0 9 * * 1" for Mondays at 9:00, or Quartz form with seconds. At most once an hour. Leave out for a one-time schedule.
timezone
string
IANA timezone the cron runs in, e.g. America/New_York; UTC when left out.
runAtUtc
string (date-time)
For a one-time schedule: when it runs.
description
string
attachmentTemplateId
string (uuid)
With an email template: a PDF template attached to each email.
exportOptions
object
Options for the PDFs a job makes.
flatten
booleandefault false
Turns fillable form fields into plain content, so the values can't be edited.
password
string
Encrypts each PDF with this password. Write-only: never returned. On a schedule update, leaving it out keeps the stored password; send `exportOptions: null` to remove it.
mergeOutputs
booleandefault false
One merged PDF instead of a ZIP with one PDF per row.
columnMapping
map of string
skipIfSourceUnchanged
booleandefault false
Skip a run when the rows are the same as the last run's.
maxRowsPerRun
integer
A run with more rows than this fails instead of sending anything.
startsAtUtc
string (date-time)
No runs before this time.
endsAtUtc
string (date-time)
No runs after this time.
requireApproval
booleandefault false
Each run waits until someone fills in the dataset's each-run values and approves it in the app, which is asked by email ApprovalLeadDays before the run. Needs a dataset source.
approvalLeadDays
integerdefault 3
How many days before each run the approval request goes out, 1 to 14.
approverUserIds
array of string (uuid)
Workspace members asked to approve each run; they get the emails. Left out, the key's creator. A workspace Owner or Admin can approve too.
requireAllApprovers
booleandefault false
Every approver must approve before a run goes out. Off, any one approval sends it.