# /attachments

6 routes.

## GET /v1/attachments

List attachments

**Scopes** — `attachments:read`

**Query**

| parameter | type | | limit |
|---|---|---|---|
| `limit` | integer | optional | max 200 |
| `cursor` | string | optional | max 4096 chars |
| `updated_since` | string | optional | max 24 chars |
| `parent_id` | string | optional | max 64 chars |

**Errors** — [unauthorized](/errors/unauthorized) · [rate_limited](/errors/rate_limited)

## POST /v1/attachments

Create a url/text/note attachment

**Scopes** — `attachments:write`

**Request body**

| field | type | | limit |
|---|---|---|---|
| `parentType` | `todo` · `container` · `inbox` | required | — |
| `parentId` | string | required | max 64 chars, min 1 |
| `kind` | `url` · `text` · `note` | required | — |
| `url` | string | optional | max 2048 chars, — |
| `text` | string | optional | max 2048 chars, — |
| `title` | string | optional | max 512 chars, — |
| `id` | string | optional | max 64 chars |

**Errors** — [validation_failed](/errors/validation_failed) · [duplicate_id](/errors/duplicate_id) · [conflict](/errors/conflict) · [unauthorized](/errors/unauthorized) · [rate_limited](/errors/rate_limited)

## GET /v1/attachments/{id}

One attachment

**Scopes** — `attachments:read`

**Errors** — [unauthorized](/errors/unauthorized) · [rate_limited](/errors/rate_limited)

## GET /v1/attachments/{id}/file

The decrypted bytes of a file attachment

**Scopes** — `attachments:read`

**Errors** — [unauthorized](/errors/unauthorized) · [rate_limited](/errors/rate_limited)

## PATCH /v1/attachments/{id}

Change an attachment

**Scopes** — `attachments:write`

**Request body**

| field | type | | limit |
|---|---|---|---|
| `title` | string | optional | max 512 chars, — |
| `url` | string | optional | max 2048 chars, — |
| `text` | string | optional | max 2048 chars, — |

**Errors** — [unauthorized](/errors/unauthorized) · [rate_limited](/errors/rate_limited)

## DELETE /v1/attachments/{id}

Delete an attachment

**Scopes** — `attachments:write`

**Errors** — [unauthorized](/errors/unauthorized) · [rate_limited](/errors/rate_limited)
