---
title: Create a report schedule
url: https://developers.wpengine.com/docs/managed-hosting-platform/api/reference/operations/createsitereportschedule/
image: https://developers.wpengine.com/og/docs/managed-hosting-platform/api/reference/operations/createsitereportschedule.png
---

# Create a report schedule

POST

/site_reports/schedules

Select code sample

```sh
curl --request POST \
  --url https://api.wpengineapi.com/v1/site_reports/schedules \
  --header 'Authorization: Basic <credentials>' \
  --header 'Content-Type: application/json' \
  --data '{ "site_id": "00000000-0000-0000-0000-000000000000", "title": "Monthly Site Performance Report", "next_scheduled_date": "2025-02-01T00:00:00.000Z", "template_uuid": "123e4567-e89b-12d3-a456-426614174000", "frequency": { "value": 7, "unit": "DAYS" }, "recipients": [ { "name": "John Doe", "email": "john@example.com" } ], "sections": [ { "name": "cover" } ] }'
```

-

Creates a scheduled report for a site.

Reports run monthly, weekly or every two weeks, based on the schedule’s `frequency`:

- **Monthly:** set `unit` to `MONTHLY` and `value` to the day of the month (1-31). For example, 15 runs the report on the 15th of every month.
- **Weekly or every two weeks:** set `unit` to `DAYS` and `value` to 7 or 14. The day of the week is determined by `next_scheduled_date`. For example, if it’s a Tuesday and `value` is 7, the report runs every Tuesday.

## Limitations & Warnings

- If a monthly schedule is set to the 29th, 30th or 31st and that date doesn’t exist in a given month, the report runs on the last day of that month.
- The response contains only a confirmation message. To retrieve the created schedule and its UUID, list the report schedules.

## Authorizations

- **[basicAuth](https://developers.wpengine.com/docs/managed-hosting-platform/api/reference/#basicauth)**

## Request Bodyrequired

Media typeapplication/json

object

**site_id**

required

ID of the site to schedule reports for

string format: uuid

### Example

```
00000000-0000-0000-0000-000000000000
```

**title**

required

Title for the scheduled report

string

### Example

```
Monthly Site Performance Report
```

**next_scheduled_date**

ISO 8601 datetime for the first report generation

string

### 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

```json
7
```

**unit**

required

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

string

Allowed values: DAYS MONTHLY

### Example

```
DAYS
```

**recipients**

required

List of recipients for the scheduled report

Array\<object>

object

**name**

string

### Example

```
John Doe
```

**email**

required

string format: email

### Example

```
john@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
```

## Responses

### 201

Returns a confirmation `message`.

Media typeapplication/json

object

**message**

string

#### Example

```json
{
  "message": "Schedule created successfully"
}
```

### 400

Bad Request

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**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

**field**

required

(Optional) The specific field associated with the error

string

**type**

required

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

string

**code**

required

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

string

**message**

required

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

string

#### Example

```json
{
  "message": "Invalid request.",
  "errors": [
    {
      "resource": "Resource",
      "field": "field_name",
      "type": "invalid_value",
      "code": "invalid",
      "message": "The value is invalid."
    }
  ]
}
```

### 401

Authentication Error

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

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

string

#### Example

```json
{
  "message": "Bad Credentials"
}
```

### 403

Not authorized

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

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

string

#### Example

```json
{
  "message": "You don't have permission to perform that action"
}
```

### 404

Not found

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

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

string

#### Example

```json
{
  "message": "Not Found"
}
```

### 429

Too many requests

### 500

Internal Server Error

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

#### Example

```json
{
  "message": "An unexpected error occurred, please try again in a few minutes"
}
```

### 502

An invalid response was received from an upstream server

### 503

Service unavailable

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
