---
title: "Create schedule"
method: POST
path: "/v2/schedules"
tags: ["Schedules"]
---

# Create schedule

`POST /v2/schedules`

Creates a new schedule with settings provided by the schedule object passed
as JSON in the payload. The response is the created schedule object.

The request needs to specify the `Content-Type: application/json` HTTP header!

When providing your API authentication token, we recommend using the
request's `Authorization` header, rather than the URL. ([More
info](#/introduction/authentication)).

## Request body

- ScheduleCreate
  - `name` string, nullable
  - `isEnabled` boolean, nullable
  - `isExclusive` boolean, nullable
  - `cronExpression` string, nullable
  - `timezone` string, nullable
  - `description` string, nullable
  - `title` string, nullable
  - `actions` ScheduleCreateAction[], nullable
    - union
      - ScheduleCreateActionRunActor
        - `type` 'RUN_ACTOR', required
        - `actorId` string, required
        - `runInput` ScheduleActionRunInput
          - `body` string, nullable
          - `contentType` string, nullable
        - `runOptions` TaskOptions
          - `build` string, nullable
          - `timeoutSecs` integer, nullable
          - `memoryMbytes` integer, nullable
          - `maxItems` integer, nullable
          - `maxTotalChargeUsd` number, nullable
          - `restartOnError` boolean, nullable
      - ScheduleCreateActionRunActorTask
        - `type` 'RUN_ACTOR_TASK', required
        - `actorTaskId` string, required
        - `input` object, nullable

## Response `201`

- ScheduleResponse
  - `data` Schedule, required
    - `id` string, required
    - `userId` string, required
    - `name` string, required
    - `cronExpression` string, required
    - `timezone` string, required
    - `isEnabled` boolean, required
    - `isExclusive` boolean, required
    - `createdAt` string, date-time, required
    - `modifiedAt` string, date-time, required
    - `nextRunAt` string, date-time, nullable
    - `lastRunAt` string, date-time, nullable
    - `description` string, nullable
    - `title` string, nullable
    - `notifications` object — Notification settings for this schedule.
      - `email` boolean
    - `actions` ScheduleAction[], required
      - union
        - ScheduleActionRunActor
          - `id` string, required
          - `type` 'RUN_ACTOR', required
          - `actorId` string, required
          - `runInput` ScheduleActionRunInput
            - `body` string, nullable
            - `contentType` string, nullable
          - `runOptions` TaskOptions
            - `build` string, nullable
            - `timeoutSecs` integer, nullable
            - `memoryMbytes` integer, nullable
            - `maxItems` integer, nullable
            - `maxTotalChargeUsd` number, nullable
            - `restartOnError` boolean, nullable
        - ScheduleActionRunActorTask
          - `id` string, required
          - `type` 'RUN_ACTOR_TASK', required
          - `actorTaskId` string, required
          - `input` object, nullable

## Other responses

- `400` — Bad request - invalid input parameters or request body.
- `401` — Unauthorized - authentication required or invalid token.
- `403` — Forbidden - insufficient permissions to perform this action.
- `404` — Not found - the requested resource does not exist.
- `405` — Method not allowed.
- `409` — Conflict - the request could not be completed due to a conflict with the current state of the resource.
- `413` — Payload too large - the request body exceeds the size limit.
- `415` — Unsupported media type - the Content-Encoding of the request is not supported.
- `429` — Too many requests - rate limit exceeded.

---

[API](https://skmtc.net/apify/apis/apify-api.md) · [All operations](https://skmtc.net/apify/apis/apify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apify/apify-api/versions/01a71794279b/schema)
