Schedule a saved report by e-mail
POST/reports/{reportId}/schedules
Scope write:reportsChanges data
Requires the write:reports scope (or management), and the staff member who made the key must be allowed to do this in the portal right now.
Parameters
reportIdRequiredSaved report id.
Idempotency-KeyOptional. Send a unique value per intended change; a retry with the same value within 24 hours replays the first answer instead of changing anything twice. Scoped to your API key.
Request body
cadenceRequiredHow often the report is e-mailed. Allowed values: daily, weekly, monthly.
atTimeRequiredWall-clock time HH:mm in the instance timezone.
weekdayWeekly only: 0 = Sunday to 6 = Saturday.
dayOfMonthMonthly only: 1 to 31; a month without that day sends on its last day.
recipientsRequired1 to 20 e-mail addresses, as typed. A report not limited to one client may only go to active staff.
enabledFalse keeps the schedule but pauses it. Create defaults to true.
Response 200
dataRequiredThe schedule.
data.idRequiredSchedule id.
data.savedReportIdRequiredThe saved report this schedule e-mails.
data.cadenceRequiredHow often the report is e-mailed.
data.atTimeRequiredHH:mm wall clock in the instance timezone.
data.weekdayRequired0-6 for weekly, else null.
data.dayOfMonthRequired1-31 for monthly (clamped to the month end), else null.
data.recipientsRequiredThe stored (trimmed, lowercased, de-duplicated) addresses.
data.enabledRequiredFalse while the schedule is paused.
alreadyExistsTrue when an identical schedule already existed and was returned instead of a second one; nothing was created.
Errors (400, 401, 402, 403, 404, 429)
400The body or a parameter is not valid for this operation (apiInvalidInput); the sentence names the field.401Missing or invalid API key (apiKeyRequired / apiKeyInvalid). A key also stops working, with apiKeyInvalid, when the staff member who made it is deactivated, blocked or removed.402This portal is locked for changes (a trial ended or a payment is overdue): writes are refused until it is settled; reads keep working (apiLocked).403The key may not do this (apiKeyScopeInsufficient when it lacks the required scope, apiKeyMakerInsufficient when the staff member who made it does not hold the permission now). Or its organization is inactive (apiKeyOrgInactive). Or the key is limited to one client, which is not supported yet (apiClientKeyUnsupported).404Not found for this key (a record in another organization is also a 404, never a 403).429Rate limit exceeded; wait Retry-After seconds.