---
title: "Create Scheduled Downtime"
method: POST
path: "/schedules/{schedule_id}/downtime/"
---

# Create Scheduled Downtime

`POST /schedules/{schedule_id}/downtime/`

## Request

- Base URL: `https://client.apimetrics.io/api/2`
- URL: `https://client.apimetrics.io/api/2/schedules/{schedule_id}/downtime/`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/apicontext/apis/api-settings/docs/schedules/:schedule_id/downtime/post.ts> (a function with typed inputs; its response is checked against the schema)

Use this API to create Downtime for a Schedule.

## Path parameters

- `schedule_id` string, required

## Request body

- object
  - `downtime` object: (set content-type: application/json)
    - `start_time` string, required: Start time of Downtime
    - `end_time` string, required: Time when Downtime ends
    - `zone` string, required: Timezone to use when applying Downtime
    - `repeated` boolean: Whether or not the Downtime repeats daily (or weekly)
    - `repeat_days` integer: If repeated, how many days later to repeat Downtime

## Response `201`

201

- object
  - `meta` object
    - `project_id` string
    - `schedule_id` string
    - `created` string
    - `state` string
    - `last_update` string
  - `id` string
  - `schedule` object
    - `repeat_days` integer
    - `start_time` string
    - `repeated` boolean
    - `end_time` string
    - `zone` string

## Other responses

- `400`: 400

---

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