---
title: "Create a scheduled freeze"
method: POST
path: "/repos/{owner}/{repository}/scheduled_freeze"
tags: ["scheduled_freeze"]
---

# Create a scheduled freeze

`POST /repos/{owner}/{repository}/scheduled_freeze`

Create a scheduled freeze for the repository specified in the path

## Path parameters

- `owner` string, required — The owner of the repository
- `repository` string, required — The name of the repository

## Request body

- CreateScheduledQueueFreezePayload
  - `reason` string, required — The reason for the scheduled freeze.
  - `start` string, date-time, nullable, required — When the scheduled freeze begins (date and time in ISO 8601 format without TZ). Begins now if the attribute is null.
  - `end` string, date-time, nullable — When the scheduled freeze ends (date and time in ISO 8601 format without TZ).
  - `timezone` string, required — Timezone where the freeze is expected to happen.
  - `matching_conditions` union[] — List of conditions used to match pull requests that need to be frozen during the scheduled freeze. Defaults to an empty list, which matches all pull requests.
    - union
      - MatchingConditionsDictInput
        - `and` union[]
          - union
            - MatchingConditionsDictInput — recursive
            - string
        - `or` union[]
          - union
            - MatchingConditionsDictInput — recursive
            - string
        - `not` MatchingConditionsDictInput — recursive
      - string
  - `exclude_conditions` union[] — List of conditions used to exclude pull requests from the scheduled freeze. Pull requests matching these conditions will not be frozen.
    - union
      - MatchingConditionsDictInput
        - `and` union[]
          - union
            - MatchingConditionsDictInput — recursive
            - string
        - `or` union[]
          - union
            - MatchingConditionsDictInput — recursive
            - string
        - `not` MatchingConditionsDictInput — recursive
      - string

## Response `201`

Successful Response

- ScheduledFreezeObjectResponse
  - `id` string, uuid, required
  - `reason` string, required
  - `start` string, date-time, required
  - `end` string, date-time, nullable, required
  - `timezone` string, required
  - `matching_conditions` union[], required
    - union
      - MatchingConditionsDictOutput
        - `and` union[]
          - union
            - MatchingConditionsDictOutput — recursive
            - string
        - `or` union[]
          - union
            - MatchingConditionsDictOutput — recursive
            - string
        - `not` MatchingConditionsDictOutput — recursive
      - string
  - `exclude_conditions` union[]
    - union
      - MatchingConditionsDictOutput
        - `and` union[]
          - union
            - MatchingConditionsDictOutput — recursive
            - string
        - `or` union[]
          - union
            - MatchingConditionsDictOutput — recursive
            - string
        - `not` MatchingConditionsDictOutput — recursive
      - string

## Other responses

- `403` — Forbidden
- `404` — Not found
- `409` — Conflict
- `422` — Unprocessable entity

## Changes

- **2026-08-28** `b3864dcc206a` — 1 info
  - the endpoint scheme security `MergifyTokenBearerAuth` was added to the API
- **2026-08-13** `29857c6146cf` — 2 info
  - the endpoint scheme security `AdminApplicationKey` was added to the API
  - the endpoint scheme security `ApplicationAuth` was removed from the API

[Change history](https://skmtc.dev/mergify/apis/mergify-api/changes/repos/:owner/:repository/scheduled_freeze/post.md)

---

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