# Download a message's file

`GET /v1/messages/{id}/media`

Returns the bytes of the file a message carries.

Needs `messages:read`.

## Path parameters

- `id` (string, uuid): The message's ID.

## Response headers

`Content-Type` is the type recorded for the file, or `application/octet-stream` if there is none. The file is always sent as an attachment, with `X-Content-Type-Options: nosniff`.

## Example

```sh
curl https://app.soosh.io/v1/messages/8c2e4f6a-1d3b-4a5c-9e7f-2b4d6f8a0c1e/media \
  -H "Authorization: Bearer $SOOSH_API_KEY" \
  -o file
```

## Returns

200. The file, as an attachment.

## Errors

Besides the ones every request can get (https://docs.soosh.io/reference/api/errors/):

- 404 `not_found`: The message has no file, the file is no longer stored, or the message is in another workspace.