Reports

3 operations. Paths start at your portal’s /api/v1.

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

  • reportIdstringin pathRequired

    Saved report id.

  • Idempotency-Keystringin header

    Optional. 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

  • cadencestringRequired

    How often the report is e-mailed. Allowed values: daily, weekly, monthly.

    One of: daily, weekly, monthly.

  • atTimestringRequired

    Wall-clock time HH:mm in the instance timezone.

    Up to 5 characters.

  • weekdayinteger or null

    Weekly only: 0 = Sunday to 6 = Saturday.

  • dayOfMonthinteger or null

    Monthly only: 1 to 31; a month without that day sends on its last day.

  • recipientsstring[]Required

    1 to 20 e-mail addresses, as typed. A report not limited to one client may only go to active staff.

    Up to 20 items.

  • enabledboolean

    False keeps the schedule but pauses it. Create defaults to true.

Response 200

  • dataobjectRequired

    The schedule.

  • data.idstringRequired

    Schedule id.

  • data.savedReportIdstringRequired

    The saved report this schedule e-mails.

  • data.cadencestringRequired

    How often the report is e-mailed.

    One of: daily, weekly, monthly.

  • data.atTimestringRequired

    HH:mm wall clock in the instance timezone.

  • data.weekdaynumber or nullRequired

    0-6 for weekly, else null.

  • data.dayOfMonthnumber or nullRequired

    1-31 for monthly (clamped to the month end), else null.

  • data.recipientsstring[]Required

    The stored (trimmed, lowercased, de-duplicated) addresses.

  • data.enabledbooleanRequired

    False while the schedule is paused.

  • alreadyExistsboolean

    True when an identical schedule already existed and was returned instead of a second one; nothing was created.

Errors (400, 401, 402, 403, 404, 429)
  • 400 The body or a parameter is not valid for this operation (apiInvalidInput); the sentence names the field.
  • 401 Missing 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.
  • 402 This portal is locked for changes (a trial ended or a payment is overdue): writes are refused until it is settled; reads keep working (apiLocked).
  • 403 The 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).
  • 404 Not found for this key (a record in another organization is also a 404, never a 403).
  • 429 Rate limit exceeded; wait Retry-After seconds.

Edit or pause a report schedule

PATCH/reports/{reportId}/schedules/{scheduleId}

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

  • reportIdstringin pathRequired

    Saved report id.

  • scheduleIdstringin pathRequired

    Schedule id.

  • Idempotency-Keystringin header

    Optional. 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

  • cadencestring

    How often the report is e-mailed. Allowed values: daily, weekly, monthly.

    One of: daily, weekly, monthly.

  • atTimestring

    Wall-clock time HH:mm in the instance timezone.

    Up to 5 characters.

  • weekdayinteger or null

    Weekly only: 0 = Sunday to 6 = Saturday.

  • dayOfMonthinteger or null

    Monthly only: 1 to 31; a month without that day sends on its last day.

  • recipientsstring[]

    1 to 20 e-mail addresses, as typed. A report not limited to one client may only go to active staff.

    Up to 20 items.

  • enabledboolean

    False keeps the schedule but pauses it. Create defaults to true.

Response 200

  • dataobjectRequired

    The schedule.

  • data.idstringRequired

    Schedule id.

  • data.savedReportIdstringRequired

    The saved report this schedule e-mails.

  • data.cadencestringRequired

    How often the report is e-mailed.

    One of: daily, weekly, monthly.

  • data.atTimestringRequired

    HH:mm wall clock in the instance timezone.

  • data.weekdaynumber or nullRequired

    0-6 for weekly, else null.

  • data.dayOfMonthnumber or nullRequired

    1-31 for monthly (clamped to the month end), else null.

  • data.recipientsstring[]Required

    The stored (trimmed, lowercased, de-duplicated) addresses.

  • data.enabledbooleanRequired

    False while the schedule is paused.

Errors (400, 401, 402, 403, 404, 429)
  • 400 The body or a parameter is not valid for this operation (apiInvalidInput); the sentence names the field.
  • 401 Missing 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.
  • 402 This portal is locked for changes (a trial ended or a payment is overdue): writes are refused until it is settled; reads keep working (apiLocked).
  • 403 The 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).
  • 404 Not found for this key (a record in another organization is also a 404, never a 403).
  • 429 Rate limit exceeded; wait Retry-After seconds.

Delete a report schedule

DELETE/reports/{reportId}/schedules/{scheduleId}

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

  • reportIdstringin pathRequired

    Saved report id.

  • scheduleIdstringin pathRequired

    Schedule id.

  • Idempotency-Keystringin header

    Optional. 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

  • reasonstringRequired

    Why this destructive action is being done (recorded in the audit log with the door it came through).

    At least 3 characters. Up to 2000 characters.

Response 200

  • dataobjectRequired

    The result of the delete.

  • data.deletedbooleanRequired

    Always true: the schedule is gone.

Errors (400, 401, 402, 403, 404, 429)
  • 400 The body or a parameter is not valid for this operation (apiInvalidInput); the sentence names the field.
  • 401 Missing 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.
  • 402 This portal is locked for changes (a trial ended or a payment is overdue): writes are refused until it is settled; reads keep working (apiLocked).
  • 403 The 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).
  • 404 Not found for this key (a record in another organization is also a 404, never a 403).
  • 429 Rate limit exceeded; wait Retry-After seconds.

All API areas →