---
title: "Stream an inbound attachment"
description: "PubNio API inbox.attachments.get: stream an inbound attachment. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream an inbound attachment

Stream an inbound attachment with [`GET /api/v1/inbox/attachments/{attachmentId}`](https://pubnio.com/api/v1/docs#tag/inbox/GET/api/v1/inbox/attachments/{attachmentId}). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

Requires workspace access. Never exposes a provider URL or token. Cache-Control is always no-store.

| Parameter      | In    | Type | Required |
| -------------- | ----- | ---- | -------- |
| `attachmentId` | path  | UUID | Yes      |
| `workspaceId`  | query | UUID | Yes      |

## Response

- HTTP 200: the file's bytes as `application/octet-stream`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const attachment = await workspace.inbox.attachment(attachmentId);
```

### Python

```python
attachment = workspace.inbox.download_attachment(attachment_id)
```

### cURL

```sh
curl "https://pubnio.com/api/v1/inbox/attachments/$ATTACHMENT_ID?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -o download.bin
```

### CLI

```sh
pnio inbox attachments get "$ATTACHMENT_ID"
```

### MCP execute

Hosted MCP's `execute` tool cannot carry this operation's binary body or response.

## Errors

It declares no problem of its own.

It declares the problems [every Inbox operation](https://pubnio.com/docs/reference/#inbox) and [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

None needed: a read is safe to retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Inbox operations](https://pubnio.com/docs/reference/#inbox)

Source: https://pubnio.com/docs/reference/inbox-attachments-get/index.mdx
