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

- Base URL: `http://localhost:3000/api`
- URL: `http://localhost:3000/api/cases`
- Auth: none declared

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

## Changes

- **2026-07-17** `886deae8a6f9`: 3 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `422`
- **2020-09-09** `a14b106f1592`: 3 breaking
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `404`
  - removed the media type `application/json` for the response with the status `422`

[Operation history](https://skmtc.dev/globaldothealth/apis/global-health-data-service/changes/cases/delete.md)

---

[API](https://skmtc.dev/globaldothealth/apis/global-health-data-service.md) - [All operations](https://skmtc.dev/globaldothealth/apis/global-health-data-service/llms.txt) - [OpenAPI document](https://skmtc.dev/globaldothealth/apis/global-health-data-service/revisions/886deae8a6f9?raw)
