---
title: "Deletes multiple cases. It is required to supply exactly one of either  caseIds or query in the request body. If caseIds are supplied, cases  corresponding to those caseIds will be deleted. If query is supplied,  all cases that match the query will be deleted."
method: DELETE
path: "/cases"
tags: ["Case"]
---

# Deletes multiple cases. It is required to supply exactly one of either  caseIds or query in the request body. If caseIds are supplied, cases  corresponding to those caseIds will be deleted. If query is supplied,  all cases that match the query will be deleted.

`DELETE /cases`

## Request body

- union
  - object
    - `caseIds` string[], required — Cases corresponding to these ids will be deleted
    - `query` string — Cases matching this query will be deleted. Must contain non-whitespace characters.
    - `maxCasesThreshold` number — An optional safeguard against deletion of too many cases. If you want to delete based on a query for example but fail if the number of cases that's going to be deleted is more than a given number, set this field to that desired number. Failure will be indicated by a 422 error status code.
  - object
    - `caseIds` string[] — Cases corresponding to these ids will be deleted
    - `query` string, required — Cases matching this query will be deleted. Must contain non-whitespace characters.
    - `maxCasesThreshold` number — An optional safeguard against deletion of too many cases. If you want to delete based on a query for example but fail if the number of cases that's going to be deleted is more than a given number, set this field to that desired number. Failure will be indicated by a 422 error status code.

## Response `204`

Cases deleted

## Other responses

- `400` — Malformed request
- `403` — Forbidden
- `404` — Not found
- `422` — Unprocessable entity
- `500` — Internal server error

---

[API](https://skmtc.net/globaldothealth/apis/global-health-data-service.md) · [All operations](https://skmtc.net/globaldothealth/apis/global-health-data-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/globaldothealth/global-health-data-service/revisions/886deae8a6f9/schema)
