---
title: "Download a file someone sent you"
method: GET
path: "/messages/{id}/attachments/{index}"
---

# Download a file someone sent you

`GET /messages/{id}/attachments/{index}`

## Request

- Base URL: `https://osis.co/api/v1/comms`
- URL: `https://osis.co/api/v1/comms/messages/{id}/attachments/{index}`
- Auth: HTTP bearer

Needs comms_read. Your key has to be in the same workspace, and on the same line if it's tied to one. Up to 20 MiB.

## Path parameters

- `id` string, required
- `index` integer, required

## Response `200`

The file. It's never cached.

## Other responses

- `401`: API key is missing or wrong
- `403`: Key doesn't have the comms_read scope
- `404`: File not found, or your key can't see its workspace or line
- `502`: The file isn't available

---

[API](https://skmtc.dev/osis/apis/comms-api.md) · [All operations](https://skmtc.dev/osis/apis/comms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/osis/apis/comms-api/revisions/59a4c0ba8936?raw)
