Skip to content
WP Engine Documentation

Update a report schedule

PATCH
/site_reports/schedules/{schedule_id}

Description

Updates an existing report schedule.

Reports can be scheduled to run monthly, weekly or every two weeks.

To run a report on a monthly basis, set the Unit to MONTHLY and set the Frequency Value to the day of the month you want the report to be run every month. For example, Unit = MONTHLY and Frequency Value = 15 will run the report on the 15th of every month. Note: if you set a report to run on the 29th, 30th or 31st of the month and that date doesn’t occur in the given month, the report will run on the last day of the month. For example, if you designate the 31st of the month, the report will run on the last day of February.

You can run reports on a weekly or every two week basis by setting the Unit to DAYS and then setting the Frequency Value to 7 for weekly reports or 14 for reports to run every two weeks. The day of the week is determined by the next_scheduled_date value. For example, if the next_scheduled_date value is a Tuesday and the Frequency Value is 7, then the report will run each week on Tuesday.

schedule_id
required
string format: uuid

ID of the schedule to update

object
title

Title for the scheduled report

string
Example
Monthly Site Performance Report
next_scheduled_date

ISO 8601 datetime for the next report generation

string format: date-time
Example
2025-02-01T00:00:00.000Z
template_uuid

UUID of the report template to use

string format: uuid
Example
123e4567-e89b-12d3-a456-426614174000
frequency

Report generation frequency. For DAYS, set value to 7 (weekly) or 14 (biweekly). For MONTHLY, set value to the day of the month (1-31).

object
value
required

Frequency value. For DAYS, value is 7 or 14. For MONTHLY, value is the day of the month (1-31).

integer
Example
7
unit
required

Frequency unit. ‘DAYS’ for weekly or biweekly reports, ‘MONTHLY’ for monthly reports.

string
Allowed values: DAYS MONTHLY
Example
DAYS
recipients

List of recipients for the report

Array<object>
object
name
string
Example
Jane Doe
email
required
string format: email
Example
jane@example.com
sections

Sections to include in the report. Valid section names depend on the template (e.g. cover, overview, usage, themes). Use GET /site_reports/templates to discover available sections for a given template.

Array<object>
object
name
string
Example
cover

Updated

object
message
string
Example
Schedule updated successfully

Bad Request

object
message
required

A message regarding the error that occurred on the server

string
Example
Invalid Site: Name cannot be empty.
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string
errors

An array of error objects describing specific errors that arose when servicing the request

Array<object>
object
resource
required

The name of the resource that was being processed when the error occurred

string
Example
Site
field
required

(Optional) The specific field associated with the error

string
Example
name
type
required

(Optional) A type associated with the error. invalid_value, access_error, value_unavailable

string
Example
invalid_value
code
required

(Optional) A machine code relating to the error that occurred with the field and resource

string
Example
too_long
message
required

(Optional) A human-readable message relating to the error that occurred with the field and resource

string
Example
Name is too long (maximum is 40 characters)

Authentication Error

object
message
required

A message regarding the error that occurred on the server

string
Example
Bad Credentials
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string

Not authorized

object
message
required

A message regarding the error that occurred on the server

string
Example
You don't have permission to perform that action
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string

Not found

object
message
required

A message regarding the error that occurred on the server

string
Example
Not Found
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string

Too many requests

Internal Server Error

object
message
required

A message regarding the error that occurred on the server

string
Example
An unexpected error occurred, please try again in a few minutes

An invalid response was received from an upstream server

Service unavailable