---
title: "Streams a CSV, TSV or JSON attachment of cases matching the search query.  If caseIds are supplied the CSV only contains cases with those ids.  You cannot supply both query and caseIds."
method: POST
path: "/cases/download"
tags: ["Case"]
---

# Streams a CSV, TSV or JSON attachment of cases matching the search query.  If caseIds are supplied the CSV only contains cases with those ids.  You cannot supply both query and caseIds.

`POST /cases/download`

## Request body

- object
  - `caseIds` string[] — Cases corresponding to these ids will be returned
  - `query` string — Cases matching this query will be returned. This is ignored if empty.
  - `limit` string — Max number of rows that can be downloaded when query is provided
  - `format` string — Format of data

## Response `200`

OK

## Other responses

- `400` — Malformed request
- `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)
