> Documentation index: https://mydrops.io/llms.txt
> Every docs page is also available as Markdown by adding .md to its URL.

# API (https://mydrops.io/docs/api)

The MyDrops REST API at https://mydrops.io/api/v1. Search, read, save and organize drops with an API key, from a script, n8n or Zapier.

The REST API does what the [MCP tools](/docs/agents.md#what-the-agent-can-do) do, for scripts and automation tools that don't speak MCP.

## Base URL

```text title="Base URL"
https://mydrops.io/api/v1
```

Send your key in a header. [API keys](/docs/api/keys.md) says how to make one.

```bash title="cURL"
curl "https://mydrops.io/api/v1/search?q=pricing" \
  -H "Authorization: Bearer mdk_your_key"
```

`X-API-Key: mdk_your_key` works too.

## Save a link

```bash title="cURL"
curl -X POST "https://mydrops.io/api/v1/drops" \
  -H "Authorization: Bearer mdk_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 2026-12-06-pricing-research" \
  -d '{ "url": "https://example.com/pricing", "project": "Pricing" }'
```

MyDrops reads the page, picks a title and summary, and fills in the category and tags you didn't give. A project name that doesn't exist yet is created. The same link twice answers the drop you have, with `"created": false`.

To save a note, send `text` instead of `url`. Text over 4,000 characters is saved as a Markdown file, searchable like any other.

## Calls

| Call                                                             | Needs | What it does                                       |
| ---------------------------------------------------------------- | ----- | -------------------------------------------------- |
| `GET /me`                                                        | read  | You, the workspace, the key's scopes and the plan  |
| `GET /library`                                                   | read  | Categories, projects and top tags                  |
| `GET /search?q=`                                                 | read  | Finds drops by what's in them                      |
| `GET /drops`                                                     | read  | Lists drops, with the same filters as search       |
| `GET /drops/:id`                                                 | read  | One drop with its full text                        |
| `GET /drops/:id/file`                                            | read  | A download link for a file, good for 10 minutes    |
| `POST /drops`                                                    | write | Saves a link, a note or an uploaded file           |
| `PATCH /drops/:id`                                               | write | Changes the title, note, categories, tags or state |
| `POST /drops/bulk`                                               | write | Changes up to 100 drops at once                    |
| `DELETE /drops/:id`                                              | write | Moves a drop to the Trash                          |
| `POST /drops/:id/restore`                                        | write | Brings it back                                     |
| `POST /uploads`                                                  | write | Starts a file upload                               |
| `GET /categories`, `/projects`, `/tags`                          | read  | Lists them                                         |
| `POST`, `PATCH`, `DELETE` on `/categories`, `/projects`, `/tags` | write | Manages them                                       |

Lists answer `{ "data": [...], "has_more", "next_cursor" }`. Send `next_cursor` back as `cursor` for the next page.

## Errors

Every error has the same shape. Branch on `code`, never on the message.

```json title="Response"
{
  "error": {
    "code": "insufficient_scope",
    "message": "This key can only read.",
    "retryable": false,
    "request_id": "req_…"
  }
}
```

| HTTP | `code`               | Meaning                                                                                    |
| ---- | -------------------- | ------------------------------------------------------------------------------------------ |
| 400  | `invalid_request`    | A field is missing or wrong. `fix` says which.                                             |
| 401  | `unauthorized`       | No key, a revoked one, or you left the workspace.                                          |
| 402  | `limit_reached`      | The workspace is at a plan limit. See [Plans](/docs/plans.md).                                |
| 403  | `insufficient_scope` | A write with a read-only key.                                                              |
| 404  | `not_found`          | No such drop, project or category in this workspace.                                       |
| 429  | `rate_limited`       | Too many requests. Wait for `Retry-After` seconds.                                         |
| 429  | `budget_reached`     | Your AI allowance for today ran out while filing. The drop is saved; it is filed tomorrow. |
| 507  | `storage_quota`      | The workspace's file storage is full.                                                      |
| 500  | `internal`           | Our fault. Retry once, and send us the `request_id` if it stays.                           |

Every `POST`, `PATCH` and `DELETE` takes an `Idempotency-Key` header. The same key with the same body within 24 hours answers the first response again, so a retry never saves twice.

## Rate limits

Per key: 300 reads, 120 searches and 60 writes a minute, and 30 uploads in 10 minutes. A 429 says when to try again in `Retry-After`.
