# Attachments

Source: https://wire.ia.br/documentation/en/api/anexos

> Upload images and files that are part of the notes.



```http
POST /vaults/{vault}/files?name={file.ext}
Content-Type: image/png
(body: the file's bytes)
```

The file goes to the vault's **Attachments** folder (`Anexos`), in the person's Google Drive. The response brings the Markdown ready to put in a page:

```json
{ "ref": "a3f9c21b7e-chart.png", "markdown": "![chart.png](Anexos/a3f9c21b7e-chart.png)" }
```

Images come back as `![name](Anexos/ref)`. Other files come back as a link `[📎 name](Anexos/ref)`.

## Example [#example]

```bash
curl -X POST "https://wire.ia.br/api/v1/vaults/principal/files?name=chart.png" \
  -H "Authorization: Bearer $PAPER_TOKEN" \
  -H "X-Paper-Account: $PAPER_ACCOUNT" \
  -H "Content-Type: image/png" \
  --data-binary @chart.png
```

Then append the Markdown to a page:

```bash
curl -X PATCH "https://wire.ia.br/api/v1/vaults/principal/pages/pa1k2m3n4o5p" \
  -H "Authorization: Bearer $PAPER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"append": "![chart.png](Anexos/a3f9c21b7e-chart.png)"}'
```

## Rules [#rules]

| Rule          | Value                                                              |
| ------------- | ------------------------------------------------------------------ |
| Permission    | Regular token with "Send files" and **Read and edit** on the vault |
| Maximum size  | 10 MB per file                                                     |
| Quantity      | 30 uploads per day, per token                                      |
| Copies for AI | Don't receive files                                                |

## What it's for, and what it isn't [#what-its-for-and-what-it-isnt]

Attachments exist for the person's notes: the photo of the meeting whiteboard, the PDF a page comments on, the chart a script generated for a report.

Don't use Paper to host images or files that other sites, apps or people will download. That includes using published links as a CDN. Hosting abuse leads to a permanent ban. See [Fair use](/en/termos/uso-justo).

Cloud image hosting for the paid plan is a future feature and doesn't exist yet.
