---
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

---

[API](https://skmtc.net/mergify/apis/mergify-api.md) · [All operations](https://skmtc.net/mergify/apis/mergify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mergify/mergify-api/revisions/ae394a06c465/schema)
