Skip to content

Download files of a case

Request

Download the files that are part of a case. The response format is determined by the Accept header:

  • multipart/mixed — returns all files as a multipart response, where each part contains the binary content of a file with its own Content-Type and Content-Disposition headers. This allows the client to iterate over the parts and attach each file individually to a workflow without any unzipping.

  • application/zip — returns all files packaged as a ZIP archive. Each file is stored under its original filename as provided during upload. Use this if your HTTP client does not support multipart response parsing.

The files returned can be filtered by their mainFile flag or by their type using the query parameters below. If no filters are provided, all files of the case are returned.

Security
OAuth2(Required scopes: cases.read)
Path
idstringrequired

Id of the case whose files should be downloaded.

Query
mainFileboolean

If set to true, only the main file of the case is returned. If set to false, only non-main files are returned. If omitted, all files are returned regardless of their main file flag.

typeArray of strings

Used to retrieve only files of specific types. Multiple types can be provided. If omitted, files of all types are returned.

curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/cases/{id}/files?mainFile=true&type=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Files of the case.

Headers
Content-Dispositionstring

For application/zip responses, suggests a filename for the downloaded archive in the format case-{id}-files.zip.

Example:"attachment; filename=\"case-6040dc9680b782b365ea77d5-files.zip\""
Body
object

A multipart response where each part corresponds to one file of the case. Each part contains the binary content of the file and the following headers:

  • Content-Type: the media type of the file (e.g. application/pdf, image/jpeg)
  • Content-Disposition: contains the filename of the file
  • X-Hy-File-Id: the identifier of the file
  • X-Hy-File-Type: the type of the file as defined in the case
  • X-Hy-File-Main: true if this is the main file of the case, false otherwise
Response
--boundary-separator
Content-Type: application/json

{}
--boundary-separator
Content-Type: application/json

{}
--boundary-separator
Content-Type: application/json

{}
--boundary-separator--