---
title: "Create a recurring schedule"
method: POST
path: "/v1/schedules"
tags: ["Schedules"]
---

# Create a recurring schedule

`POST /v1/schedules`

## Request

- Base URL: `https://www.chatrail.dev`
- URL: `https://www.chatrail.dev/v1/schedules`
- Auth: HTTP bearer

Daily, weekly or monthly, resolved in the given IANA timezone. A schedule that fell behind fires once and drops the backlog rather than delivering days of stale messages.

## Request body

- object
  - `name` string, required
  - `timezone` string, required
  - `recurrence` union, required
    - object
      - `type` 'daily', required
      - `hour` integer, required
      - `minute` integer, required
    - object
      - `type` 'weekly', required
      - `hour` integer, required
      - `minute` integer, required
      - `days_of_week` integer[], required
    - object
      - `type` 'monthly', required
      - `hour` integer, required
      - `minute` integer, required
      - `day_of_month` union, required
        - integer
        - -1
  - `message` object, required
  - `starts_at` string, date-time
  - `ends_at` string, date-time
  - `max_occurrences` integer

## Response `201`

Created, with the resolved `next_run_at`.

## Other responses

- `400`: Unknown timezone, or a recurrence that would never fire.
- `402`: The plan does not include scheduling.

---

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