---
title: "Create a schedule"
method: POST
path: "/project/{project-slug}/schedule"
tags: ["Schedule"]
---

# Create a schedule

`POST /project/{project-slug}/schedule`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/project/{project-slug}/schedule`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Creates a schedule and returns the created schedule. Available only on organizations of type `bitbucket` and `github`, and for the latter will exclusively create schedule triggers associated with the GitHub OAuth pipeline definition. For projects of type `circleci`, or to create schedule triggers for GitHub App pipeline definitions, use the [Create trigger](https://circleci.com/docs/api/v2/index.html#tag/Trigger/operation/createTrigger) endpoint.

## Path parameters

- `project-slug` string, required

## Request body

- object: The parameters for a create schedule request
  - `name` string, required: Name of the schedule.
  - `timetable` union, required: Timetable that specifies when a schedule triggers.
    - object
      - `per-hour` integer, required: Number of times a schedule triggers per hour, value must be between 1 and 60
      - `hours-of-day` integer[], required: Hours in a day in which the schedule triggers.
      - `days-of-week` string[], required: Days in a week in which the schedule triggers.
      - `days-of-month` integer[]: Days in a month in which the schedule triggers. This is mutually exclusive with days in a week.
      - `months` string[]: Months in which the schedule triggers.
    - object
      - `per-hour` integer, required: Number of times a schedule triggers per hour, value must be between 1 and 60
      - `hours-of-day` integer[], required: Hours in a day in which the schedule triggers.
      - `days-of-month` integer[], required: Days in a month in which the schedule triggers. This is mutually exclusive with days in a week.
      - `days-of-week` string[]: Days in a week in which the schedule triggers.
      - `months` string[]: Months in which the schedule triggers.
  - `attribution-actor` 'current' | 'system', required: The attribution-actor of the scheduled pipeline.
  - `parameters` object, required: Pipeline parameters represented as key-value pairs. Must contain branch or tag.
  - `description` string: Description of the schedule.

## Response `201`

A schedule object.

- object: A schedule response
  - `id` string, uuid, required: The unique ID of the schedule.
  - `timetable` union, required: Timetable that specifies when a schedule triggers.
    - object
      - `per-hour` integer, required: Number of times a schedule triggers per hour, value must be between 1 and 60
      - `hours-of-day` integer[], required: Hours in a day in which the schedule triggers.
      - `days-of-week` string[], required: Days in a week in which the schedule triggers.
      - `days-of-month` integer[]: Days in a month in which the schedule triggers. This is mutually exclusive with days in a week.
      - `months` string[]: Months in which the schedule triggers.
    - object
      - `per-hour` integer, required: Number of times a schedule triggers per hour, value must be between 1 and 60
      - `hours-of-day` integer[], required: Hours in a day in which the schedule triggers.
      - `days-of-month` integer[], required: Days in a month in which the schedule triggers. This is mutually exclusive with days in a week.
      - `days-of-week` string[]: Days in a week in which the schedule triggers.
      - `months` string[]: Months in which the schedule triggers.
  - `updated-at` string, date-time, required: The date and time the pipeline was last updated.
  - `name` string, required: Name of the schedule.
  - `created-at` string, date-time, required: The date and time the pipeline was created.
  - `project-slug` string, required: The project-slug for the schedule
  - `parameters` object, required: Pipeline parameters represented as key-value pairs. Must contain branch or tag.
  - `actor` object, required: The attribution actor who will run the scheduled pipeline.
    - `avatar_url` string, required: URL to the user's avatar on the VCS
    - `id` string, uuid, required: The unique ID of the user.
    - `login` string, required: The login information for the user on the VCS.
    - `name` string, required: The name of the user.
  - `description` string, required: Description of the schedule.

## Other responses

- `default`: Error response.

---

[API](https://skmtc.dev/circleci/apis/circleci-api.md) - [All operations](https://skmtc.dev/circleci/apis/circleci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/circleci/apis/circleci-api/revisions/b9c0e0c24058?raw)
