---
title: "Mark a test as quarantined"
method: POST
path: "/ci/{owner}/repositories/{repository}/quarantines"
tags: ["test_insights"]
---

# Mark a test as quarantined

`POST /ci/{owner}/repositories/{repository}/quarantines`

Add a test to the CI Quarantine for a repository

## Path parameters

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

## Request body

- AddTestToQuarantinePayload
  - `test_name` string, required — The fully qualified name of the test that needs to be quarantined
  - `reason` string, required — Reason for the test being added to the quarantine
  - `branch` string, nullable — Branch name on which the test should be quarantined. If not specified, it will be quarantined on all branches.

## Response `201`

Successful Response

- TestAddedToQuarantineResponse
  - `id` string, uuid, required — The ID of the created quarantine

## Other responses

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

## Changes

- **2026-09-03** `0d03a872f0d1` — 1 info
  - the endpoint scheme security `CIApplicationKey` was removed from the API
- **2026-08-28** `b3864dcc206a` — 1 info
  - the endpoint scheme security `MergifyTokenBearerAuth` was added to the API
- **2026-08-13** `29857c6146cf` — 3 info
  - the endpoint scheme security `AdminApplicationKey` was added to the API
  - the endpoint scheme security `CIApplicationKey` 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/ci/:owner/repositories/:repository/quarantines/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/0414e6db380a?raw)
