> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Add report schedule

POST https://api.sigmacomputing.com/v2/reports/{reportId}/schedules
Content-Type: application/json

This endpoint allows you to create a scheduled export of a report. Scheduled exports are triggered by specific conditions or timings.

  ### Usage notes
  - Retrieve the **reportId** by calling the [/v2/reports](https://help.sigmacomputing.com/reference/list-reports) endpoint.
  - Retrieve relevant IDs based on the export contents and destination:
    - To export to one or more Sigma users, retrieve the **memberId** by calling the [/v2/members](https://help.sigmacomputing.com/reference/list-members) endpoint.
    - To export to one or more Sigma teams, retrieve the **teamId** by calling the [/v2/teams](https://help.sigmacomputing.com/reference/list-teams) endpoint.
  - Reports can only be exported as entire PDFs. Exporting a specific page or element is not supported.
  - If you want to impersonate a user when scheduling a report export, use the [/v2/auth/token](https://help.sigmacomputing.com/reference/post-token) endpoint.

  ### Usage scenarios
  - **Periodic reporting**: Use this endpoint to trigger routine report exports at specific intervals (such as weekly or monthly) or when specific business conditions are met (such as specific sales targets or usage thresholds).

  ### Best practices
  - Regularly review and audit schedules to ensure unnecessary or expensive schedules are not being added.

Reference: https://help.sigmacomputing.com/reference/create-report-schedule

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sigmacomputing.com` (Server for GCP (US) hosted organizations, default)
- `https://api.sa.gcp.sigmacomputing.com` (Server for GCP (KSA) hosted organizations)
- `https://aws-api.sigmacomputing.com` (Server for AWS US (West) hosted organizations)
- `https://api.us-a.aws.sigmacomputing.com` (Server for AWS US (East) hosted organizations)
- `https://api.ca.aws.sigmacomputing.com` (Server for AWS Canada hosted organizations)
- `https://api.eu.aws.sigmacomputing.com` (Server for AWS Europe hosted organizations)
- `https://api.au.aws.sigmacomputing.com` (Server for AWS Australia and APAC hosted organizations)
- `https://api.uk.aws.sigmacomputing.com` (Server for AWS UK hosted organizations)
- `https://api.us.azure.sigmacomputing.com` (Server for Azure US hosted organizations)
- `https://api.eu.azure.sigmacomputing.com` (Server for Azure Europe hosted organizations)
- `https://api.ca.azure.sigmacomputing.com` (Server for Azure Canada hosted organizations)
- `https://api.uk.azure.sigmacomputing.com` (Server for Azure United Kingdom hosted organizations)
- `https://api.au.azure.sigmacomputing.com` (Server for Azure Australia hosted organizations)

## Request

### Path parameters

- `reportId` (string, required)

### Body (application/json)

- `target` (list of object, required) — One or more targets to send the report to.
  - `teamId` (string, optional) — Unique identifier of the team to export to
  - `email` (string, optional) — Email address to export to
  - `ccEmail` (string, optional) — Email address to add as a Cc recipient
  - `bccEmail` (string, optional) — Email address to add as a Bcc recipient
  - `ccTeamId` (string, optional) — Unique identifier of the team to add as a Cc recipient
  - `bccTeamId` (string, optional) — Unique identifier of the team to add as a Bcc recipient
  - `slackConversationId` (string, optional) — Slack channel ID or member ID to export to
  - `googleSpreadsheetUrl` (string, optional) — URL of the Google Sheet to export to
  - `googleDriveFolderUrl` (string, optional) — URL of the Google Drive folder to export to
  - `webhookUrl` (string, optional) — URL of the webhook endpoint to export to
- `schedule` (object, required) — When to send the report export.
  - `cronSpec` (string, required) — A [cron expression](https://en.wikipedia.org/wiki/Cron). For example, `0 0 * * *`.
  - `timezone` (string, required) — An [IANA timezone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, `America/Los_Angeles`.
- `configV2` (object, required) — Configuration settings for the export schedule.
  - `title` (string, required) — Title of the message
  - `messageBody` (string, required) — Body of the message
  - `exportAttachments` (list of object, required) — Attachments to include in the export. Reports only support PDF.
    - `formatOptions` (object, required) — Export format options. Reports only support PDF.
      - `type` (enum, required)
        - Allowed values: `PDF`
      - `layout` (enum, optional)
        - Allowed values: `portrait`, `landscape`
      - `scaleFactor` (double, optional)
  - `exportName` (string, optional) — Name of the scheduled export
  - `includeLink` (boolean, optional) — Include a link to the exported report
  - `runAsRecipient` (boolean, optional) — Run the export queries as the recipient
  - `attachmentSettings` (object, optional) — Export attachment settings
    - `mergeAttachments` (boolean, optional) — Combines multiple PDF attachments into a single file
    - `zipAttachments` (boolean, optional) — Send attachments as a .zip file
  - `reportVariant` (object, optional) — Report variant
    - `tagId` (string, optional) — Version tag to export
  - `conditionOptions` (object or object, optional) — Export condition options
    - Always
      - `type` (enum, required)
        - Allowed values: `always`
    - Workbook condition
      - `type` (enum, required)
        - Allowed values: `workbook`
      - `condition` (object or object or object, required)
        - Element is empty
          - `type` (enum, required) — Type of condition
            - Allowed values: `isEmpty`
          - `elementId` (string, required) — ID of the element
        - Element is not empty
          - `type` (enum, required) — Type of condition
            - Allowed values: `isNotEmpty`
          - `elementId` (string, required) — ID of the element
        - Column meets condition
          - `type` (enum, required) — Type of condition
            - Allowed values: `column`
          - `elementId` (string, required) — ID of the element
          - `columnId` (string, required) — ID of the column
          - `op` (enum, required) — Operator
            - Allowed values: `Equals`, `GreaterThan`, `GreaterThanEq`, `LessThan`, `LessThanEq`, `NotEquals`, `IsNull`, `IsNotNull`, `Contains`, `StartsWith`, `EndsWith`
          - `mode` (enum, required) — Kind of condition evaluation
            - Allowed values: `any`, `all`
          - `value` (object or object or object or object, optional) — Column value
            - Boolean value
            - Integer value
            - Text value
            - Fixed date selection
  - `reportSettings` (object, optional) — Report settings
    - `controlValues` (map from string to object or object or object or object or object or object or object or object or object or object or object or object or object or object or object, optional) — This object maps control IDs to the values that they should have when exporting the workbook.
      - Boolean list value
        - `type` (enum, required)
          - Allowed values: `boolean-list`
        - `value` (object, required)
          - `true` (boolean, required)
          - `false` (boolean, required)
          - `null` (boolean, optional)
      - Hierarchical list value
        - `type` (enum, required)
          - Allowed values: `hierarchical-list`
        - `value` (list of list of object, required) — Array of hierarchy paths. Each path is an array of segments, from the highest selected level of the hierarchy down to the lowest selected level of the hierarchy. Each segment is a `{type: "text", value: string}` object. For example, a Region/State/City hierarchy control with Oakland selected would be represented as `[[{"type":"text","value":"West"}, {"type":"text","value":"California"}, {"type":"text","value":"Oakland"}]]`
          - `type` (enum, required)
            - Allowed values: `text`
          - `value` (string, required)
      - Date range value
        - `type` (enum, required)
          - Allowed values: `date-range`
        - `min` (object or object or object, required) — Date selection
          - Fixed date selection
            - `type` (enum, required)
            - `date` (string, required) — ISO-8601 date string
          - Relative date selection
            - `type` (enum, required)
            - `unit` (enum, required)
            - `x` (double, required)
          - Null date value
            - `type` (enum, required)
        - `max` (object or object or object, required) — Date selection
          - Fixed date selection
            - `type` (enum, required)
            - `date` (string, required) — ISO-8601 date string
          - Relative date selection
            - `type` (enum, required)
            - `unit` (enum, required)
            - `x` (double, required)
          - Null date value
            - `type` (enum, required)
      - Number range value
        - `type` (enum, required)
          - Allowed values: `number-range`
        - `min` (double, optional) — Minimum value of the range
        - `max` (double, optional) — Maximum value of the range
- `description` (string, optional, nullable) — Description of the scheduled export

## Response

### 200

The response body.

- `scheduledNotificationId` (string, required) — Unique identifier of the scheduled export.
- `reportId` (string, required) — Unique identifier of the report.
- `schedule` (object, required)
  - `cronSpec` (string, required) — A [cron expression](https://en.wikipedia.org/wiki/Cron). For example, `0 0 * * *`.
  - `timezone` (string, required) — An [IANA timezone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, `America/Los_Angeles`.
- `configV2` (object, required)
  - `title` (string, required)
  - `messageBody` (string, required)
  - `notificationAttachments` (list of object, required)
    - `formatOptions` (object or object, required)
      - object
        - `type` (enum, required)
          - Allowed values: `PDF`
        - `layout` (enum, optional)
          - Allowed values: `portrait`, `landscape`
        - `scaleFactor` (double, optional)
      - object
        - `type` (enum, required)
          - Allowed values: `NONE`
    - `workbookExportSource` (object, optional)
      - `type` (enum, required)
        - Allowed values: `report`
  - `includeLink` (boolean, optional)
  - `runAsRecipient` (boolean, optional)
  - `attachmentSettings` (object, optional)
    - `mergePdfAttachments` (boolean, optional)
    - `zipAttachments` (boolean, optional)
  - `conditionOptions` (object or object or object or object, optional)
    - object
      - `type` (enum, required)
        - Allowed values: `always`
    - object
      - `type` (enum, required)
        - Allowed values: `workbook`
      - `conditions` (list of object or object or object, required)
        - object
          - `type` (enum, required)
            - Allowed values: `isEmpty`
          - `sheetId` (string, required)
        - object
          - `type` (enum, required)
            - Allowed values: `isNotEmpty`
          - `sheetId` (string, required)
        - object
          - `type` (enum, required)
            - Allowed values: `sheetColumn`
          - `sheetId` (string, required)
          - `mode` (enum or enum, required)
          - `columnId` (string, required)
          - `op` (enum, required)
            - Allowed values: `Equals`, `GreaterThan`, `GreaterThanEq`, `LessThan`, `LessThanEq`, `NotEquals`, `IsNotNull`, `IsNull`, `Contains`, `StartsWith`, `EndsWith`
          - `value` (object or object or object or object or object or object or object or object or object or object, optional)
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
    - object
      - `type` (enum, required)
        - Allowed values: `worksheet`
      - `conditions` (list of object or object or object, required)
        - object
          - `type` (enum, required)
            - Allowed values: `isEmpty`
        - object
          - `type` (enum, required)
            - Allowed values: `isNotEmpty`
        - object
          - `type` (enum, required)
            - Allowed values: `queryColumn`
          - `mode` (enum or enum, required)
          - `columnId` (string, required)
          - `op` (enum, required)
            - Allowed values: `Equals`, `GreaterThan`, `GreaterThanEq`, `LessThan`, `LessThanEq`, `NotEquals`, `IsNotNull`, `IsNull`, `Contains`, `StartsWith`, `EndsWith`
          - `value` (object or object or object or object or object or object or object or object or object or object, optional)
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
    - object
      - `type` (enum, required)
        - Allowed values: `dashboard`
      - `conditions` (list of object or object or object, required)
        - object
          - `type` (enum, required)
            - Allowed values: `isEmpty`
          - `tileId` (string, required)
        - object
          - `type` (enum, required)
            - Allowed values: `isNotEmpty`
          - `tileId` (string, required)
        - object
          - `type` (enum, required)
            - Allowed values: `chartColumn`
          - `tileId` (string, required)
          - `mode` (enum or enum, required)
          - `columnId` (string, required)
          - `op` (enum, required)
            - Allowed values: `Equals`, `GreaterThan`, `GreaterThanEq`, `LessThan`, `LessThanEq`, `NotEquals`, `IsNotNull`, `IsNull`, `Contains`, `StartsWith`, `EndsWith`
          - `value` (object or object or object or object or object or object or object or object or object or object, optional)
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
            - object
  - `alertConfig` (object, optional)
    - `window` (enum, required)
      - Allowed values: `alltime`, `daily`, `weekly`, `always`
    - `volume` (double, optional, nullable)
  - `notificationName` (string, optional)
  - `reportSettings` (object, optional)
    - `filters` (list of object, optional)
      - `id` (string, required)
      - `filterStr` (string, required)
    - `variableValues` (object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object, optional)
      - boolean
        - `type` (enum, required)
          - Allowed values: `boolean`
        - `value` (boolean, required, nullable)
      - number
        - `type` (enum, required)
          - Allowed values: `number`
        - `value` (double, required, nullable)
      - text
        - `type` (enum, required)
          - Allowed values: `text`
        - `value` (string, required, nullable)
      - date
        - `type` (enum, required)
          - Allowed values: `date`
        - `value` (object or object, required, nullable)
          - object
            - `type` (enum, required)
            - `date` (double, required)
          - object
            - `type` (enum, required)
            - `unit` (enum, required)
            - `x` (double, required)
      - number-list
        - `type` (enum, required)
          - Allowed values: `number-list`
        - `value` (list of double, required)
      - text-list
        - `type` (enum, required)
          - Allowed values: `text-list`
        - `value` (list of string, required)
      - date-list
        - `type` (enum, required)
          - Allowed values: `date-list`
        - `value` (list of double, required)
      - boolean-list
        - `type` (enum, required)
          - Allowed values: `boolean-list`
        - `value` (object, required)
          - `true` (boolean, required)
          - `false` (boolean, required)
          - `null` (boolean, optional)
      - date-range
        - `type` (enum, required)
          - Allowed values: `date-range`
        - `min` (object or object, required, nullable)
          - object
            - `type` (enum, required)
            - `date` (double, required)
          - object
            - `type` (enum, required)
            - `unit` (enum, required)
            - `x` (double, required)
        - `max` (object or object, required, nullable)
          - object
            - `type` (enum, required)
            - `date` (double, required)
          - object
            - `type` (enum, required)
            - `unit` (enum, required)
            - `x` (double, required)
      - number-range
        - `type` (enum, required)
          - Allowed values: `number-range`
        - `min` (double, required, nullable)
        - `max` (double, required, nullable)
      - date-null
        - `type` (enum, required)
          - Allowed values: `date-null`
      - number-null
        - `type` (enum, required)
          - Allowed values: `number-null`
      - text-null
        - `type` (enum, required)
          - Allowed values: `text-null`
      - boolean-null
        - `type` (enum, required)
          - Allowed values: `boolean-null`
      - hierarchical-list
        - `type` (enum, required)
          - Allowed values: `hierarchical-list`
        - `value` (list of string, required)
      - file
        - `type` (enum, required)
          - Allowed values: `file`
        - `value` (object, required)
          - `id` (string, required)
          - `name` (string, required)
          - `size` (double, required)
          - `type` (string, required)
          - `downloadUrl` (string, required)
      - file-null
        - `type` (enum, required)
          - Allowed values: `file-null`
      - file-list
        - `type` (enum, required)
          - Allowed values: `file-list`
        - `value` (list of object, required)
          - `id` (string, required)
          - `name` (string, required)
          - `size` (double, required)
          - `type` (string, required)
          - `downloadUrl` (string, required)
  - `dynamicExportSettings` (object, optional)
    - `variables` (map from string to object or object or object or object or object or object or object or object or object or object or object or object or object or object, optional)
      - object
        - `type` (enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (enum, required)
          - Allowed values: `number`
      - object
        - `type` (enum, required)
          - Allowed values: `text`
      - object
        - `type` (enum, required)
          - Allowed values: `date`
      - object
        - `type` (enum, required)
          - Allowed values: `number-list`
      - object
        - `type` (enum, required)
          - Allowed values: `text-list`
      - object
        - `type` (enum, required)
          - Allowed values: `date-list`
      - object
        - `type` (enum, required)
          - Allowed values: `boolean-list`
      - object
        - `type` (enum, required)
          - Allowed values: `date-range`
      - object
        - `type` (enum, required)
          - Allowed values: `number-range`
      - object
        - `type` (enum, required)
          - Allowed values: `date-null`
      - object
        - `type` (enum, required)
          - Allowed values: `number-null`
      - object
        - `type` (enum, required)
          - Allowed values: `text-null`
      - object
        - `type` (enum, required)
          - Allowed values: `boolean-null`
  - `dynamicRecipientSettings` (object, optional)
    - `sourceNodeId` (string, required)
    - `recipientColumnId` (string, required)
  - `rowLimit` (double, optional)
  - `reportVariant` (object, optional)
    - `tagId` (string, optional)
  - `embedOpts` (object, optional)
    - `embedId` (string, optional)
    - `evalConnectionId` (string, optional)
- `isSuspended` (boolean, required) — Whether the schedule is currently suspended.
- `ownerId` (string, required) — Unique identifier of the user who owns the schedule.
- `lastUpdatedByUser` (string, required) — Unique identifier of the user who last updated the schedule.
- `disabledAt` (datetime, required, nullable) — Timestamp when the schedule was disabled, or null if the schedule is active.
- `disabledBy` (string, required, nullable) — Unique identifier of the member who disabled the schedule, or null if the schedule is active.
- `createdBy` (string, required) — The identifier of the user who created this object.
- `updatedBy` (string, required) — The identifier of the user or process that last updated this object.
- `createdAt` (datetime, required) — When the object was created.
- `updatedAt` (datetime, required) — When the object was last updated.

## Examples

**Request**

```json
{
  "target": [
    {}
  ],
  "schedule": {
    "cronSpec": "string",
    "timezone": "string"
  },
  "configV2": {
    "title": "string",
    "messageBody": "string",
    "exportAttachments": [
      {
        "formatOptions": {
          "type": "PDF"
        }
      }
    ]
  }
}
```

**Response**

```json
{
  "scheduledNotificationId": "string",
  "reportId": "string",
  "schedule": {
    "cronSpec": "string",
    "timezone": "string"
  },
  "configV2": {
    "title": "string",
    "messageBody": "string",
    "notificationAttachments": [
      {
        "formatOptions": {
          "layout": "portrait",
          "scaleFactor": 1.1,
          "type": "PDF"
        },
        "workbookExportSource": {
          "type": "report"
        }
      }
    ],
    "includeLink": true,
    "runAsRecipient": true,
    "attachmentSettings": {
      "mergePdfAttachments": true,
      "zipAttachments": true
    },
    "conditionOptions": {
      "type": "always"
    },
    "alertConfig": {
      "window": "alltime",
      "volume": 1.1
    },
    "notificationName": "string",
    "reportSettings": {
      "filters": [
        {
          "id": "string",
          "filterStr": "string"
        }
      ],
      "variableValues": {}
    },
    "dynamicExportSettings": {
      "variables": {}
    },
    "dynamicRecipientSettings": {
      "sourceNodeId": "string",
      "recipientColumnId": "string"
    },
    "rowLimit": 1.1,
    "reportVariant": {
      "tagId": "string"
    },
    "embedOpts": {
      "embedId": "string",
      "evalConnectionId": "string"
    }
  },
  "isSuspended": true,
  "ownerId": "string",
  "lastUpdatedByUser": "string",
  "disabledAt": "2024-01-15T09:30:00Z",
  "disabledBy": "string",
  "createdBy": "string",
  "updatedBy": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.sigmacomputing.com/v2/reports/reportId/schedules"

payload = {
    "target": [{}],
    "schedule": {
        "cronSpec": "string",
        "timezone": "string"
    },
    "configV2": {
        "title": "string",
        "messageBody": "string",
        "exportAttachments": [{ "formatOptions": { "type": "PDF" } }]
    }
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sigmacomputing.com/v2/reports/reportId/schedules';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"target":[{}],"schedule":{"cronSpec":"string","timezone":"string"},"configV2":{"title":"string","messageBody":"string","exportAttachments":[{"formatOptions":{"type":"PDF"}}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sigmacomputing.com/v2/reports/reportId/schedules"

	payload := strings.NewReader("{\n  \"target\": [\n    {}\n  ],\n  \"schedule\": {\n    \"cronSpec\": \"string\",\n    \"timezone\": \"string\"\n  },\n  \"configV2\": {\n    \"title\": \"string\",\n    \"messageBody\": \"string\",\n    \"exportAttachments\": [\n      {\n        \"formatOptions\": {\n          \"type\": \"PDF\"\n        }\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sigmacomputing.com/v2/reports/reportId/schedules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"target\": [\n    {}\n  ],\n  \"schedule\": {\n    \"cronSpec\": \"string\",\n    \"timezone\": \"string\"\n  },\n  \"configV2\": {\n    \"title\": \"string\",\n    \"messageBody\": \"string\",\n    \"exportAttachments\": [\n      {\n        \"formatOptions\": {\n          \"type\": \"PDF\"\n        }\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sigmacomputing.com/v2/reports/reportId/schedules")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": [\n    {}\n  ],\n  \"schedule\": {\n    \"cronSpec\": \"string\",\n    \"timezone\": \"string\"\n  },\n  \"configV2\": {\n    \"title\": \"string\",\n    \"messageBody\": \"string\",\n    \"exportAttachments\": [\n      {\n        \"formatOptions\": {\n          \"type\": \"PDF\"\n        }\n      }\n    ]\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sigmacomputing.com/v2/reports/reportId/schedules', [
  'body' => '{
  "target": [
    {}
  ],
  "schedule": {
    "cronSpec": "string",
    "timezone": "string"
  },
  "configV2": {
    "title": "string",
    "messageBody": "string",
    "exportAttachments": [
      {
        "formatOptions": {
          "type": "PDF"
        }
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sigmacomputing.com/v2/reports/reportId/schedules");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"target\": [\n    {}\n  ],\n  \"schedule\": {\n    \"cronSpec\": \"string\",\n    \"timezone\": \"string\"\n  },\n  \"configV2\": {\n    \"title\": \"string\",\n    \"messageBody\": \"string\",\n    \"exportAttachments\": [\n      {\n        \"formatOptions\": {\n          \"type\": \"PDF\"\n        }\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [
  "target": [[]],
  "schedule": [
    "cronSpec": "string",
    "timezone": "string"
  ],
  "configV2": [
    "title": "string",
    "messageBody": "string",
    "exportAttachments": [["formatOptions": ["type": "PDF"]]]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sigmacomputing.com/v2/reports/reportId/schedules")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```