# API reference

Use your Reseek library, money, reminders and quizzes from your own scripts and tools.

## Before you start

You need an API token.

1. In Reseek, open **Settings**, then **API Tokens**.
2. Create a token and copy it. Keep it somewhere safe.

A token can have two permissions:

- **Read** lets a token see your library, tags, stats, money, reminders and quizzes.
- **Write** lets a token save, change and delete items, and create or change money entries, reminders and quizzes.

Tokens can be set to stop working after 7, 30, 90 or 365 days.

## Address and headers

| What | Value |
| --- | --- |
| API base URL | `https://reseek.net/api` |
| Auth header | `Authorization: Bearer YOUR_API_TOKEN` |
| Recommended header | `Accept: application/json` |

## Check your token

Run this first. If it succeeds, your token and header are set up correctly.

```bash
curl "https://reseek.net/api/user" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
```

## Limits

- Each token can make up to 120 requests a minute. Past that you get a `429` response with a `Retry-After` header.
- Low-level scrape, OCR, AI chat and dashboard utility endpoints are not available through API tokens.
- Money endpoints keep records only. They do not move real money.

The endpoints below match the tools that AI apps get through MCP. See [Connect a coding agent](/docs/mcp-agents).

## Your account

### `GET` `/api/user`

Returns your profile and what the current token can do (abilities and expiry).

No body required. Works with any valid token.

## Library

### `POST` `/api/library`

Search or browse saved library items. Sentence queries are translated and converted into search keywords automatically.

Body: optional query, type, date filters, sort, page, per_page, edit_id, tags.

### `POST` `/api/note`

Saves a plain text note. Reseek translates, tags, chunks, and embeds it through the same save pipeline used by the app.

Body: content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/link`

Saves a normal URL/link. Use the dedicated social and YouTube endpoints for richer extraction.

Body: url or content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/twitter`

Saves a Twitter/X status URL as Twitter content. Scraping and metadata extraction stay internal.

Body: url or content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/youtube`

Saves a YouTube URL as YouTube content. Transcript/metadata handling stays internal.

Body: url or content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/instagram`

Saves a public Instagram post or reel and extracts its caption, author, stats, and media.

Body: url or content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/facebook`

Saves a public Facebook page/group post or photo and extracts its content, author, stats, and media.

Body: url or content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/image`

Saves an image upload or image URL as image content. OCR stays internal.

Multipart body: file, or JSON body: url/content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/pdf`

Saves a PDF upload or PDF URL as PDF content. Text extraction stays internal.

Multipart body: file, or JSON body: url/content. Optional: description, metadata as JSON string, tags as JSON string array.

### `POST` `/api/video`

Saves a video upload or video URL as video content.

Multipart body: file, or JSON body: url/content. Optional: description, metadata as JSON string, tags as JSON string array.

### `GET` `/api/library/{id}`

Fetches one saved item by id.

Route param: id.

### `PATCH` `/api/library/{id}`

Changes one saved item. Only the fields you send change.

Write scope. Body: any of description, tags (array or JSON string array; an empty list removes all tags), content (notes only). Saved metadata and the original source stay as they are. If an edited note has Money entries, they are not changed; the note is flagged for review.

### `DELETE` `/api/library/{id}`

Permanently deletes one saved item and its uploaded file. This cannot be undone.

Write scope. Route param: id.

### `GET` `/api/tags`

Lists the tags used on your saved items.

Read scope. Query: optional q to match part of a tag name.

### `GET` `/api/stats`

How many items you have saved in total, today and this week, plus your most recent items.

Read scope. No body required.

## Money

### `GET` `/api/money/notes`

List saved notes needing money details.

Read scope. Use document_id to check one note, including completed extraction; page selects a result page.

### `POST` `/api/money/notes/resolve`

Resolve money details from a saved note.

Write scope. Use document_id, action and entry_index. Supply missing Money fields for record; ignore skips an entry; retry restarts a failed check; reviewed closes a completed review.

### `GET` `/api/money/owed`

Find money owed to you or by you, including partial repayments and settled entries.

Read scope. Query: query (person or description), direction (all/lent/borrowed), status (open/settled/voided/all), currency, page, limit. Totals cover all matches, separately by currency.

### `GET` `/api/money`

Search transactions with totals across all matches, grouped by currency.

Query: query (plain text, case-insensitive; quotes match a phrase), type, status, account_id, currency, payee, tag, date_from, date_to, min_amount, max_amount, sort, page, limit. Amount filtering/sorting requires currency.

### `GET` `/api/money/overview`

The Money page overview: income, spending, spending by tag, a trend and the previous period, combined into one display currency.

Read scope. Query: display_currency (required) plus the same filters as /api/money. Combined amounts are estimates at the returned rate date. When rates are unavailable, available is false and no combined total is returned.

### `GET` `/api/money/accounts`

List wallets, their recorded balances, defaults and supported currency precision.

No body required. Requires read permission.

### `POST` `/api/money/accounts`

Create an account or wallet.

Body: name, currency. Optional: opening_balance (decimal string), is_default.

### `PATCH` `/api/money/accounts/{accountId}`

Rename, archive/restore or choose a default account.

Body: name, is_default, archived. Currency and opening_balance cannot be changed.

### `POST` `/api/money/transactions`

Record expense, income, transfer, refund, lent, borrowed, received_back or paid_back. Both transfer legs are atomic.

Body: type, amount (decimal string), description, idempotency_key (or Idempotency-Key header). Supply account_id, or account_name + currency. Optional: occurred_on, payee, tags (array; an empty array means no tags), notes, document_id. Transfers: destination_account_id/name, destination_currency for new wallets, destination_amount for currency exchanges, fee. Refunds: optional refund_of_id when the original purchase is known; otherwise use a description. Lent/Borrowed: payee (person). Received back/Paid back: repayment_of_id (original loan UUID); positive amount in the original currency, up to the remaining amount.

### `GET` `/api/money/transactions/{transactionId}`

Get one transaction and its versioned history.

Route param: transactionId. Requires read permission.

### `PATCH` `/api/money/transactions/{transactionId}`

Correct a transaction and recalculate its balance effects.

Body: current version plus changed transaction fields. Reload on a version conflict.

### `DELETE` `/api/money/transactions/{transactionId}`

Void a transaction, reversing its balance effects while retaining history.

JSON body: current version. Void linked refunds before changing their original expense.

### `GET` `/api/money/quote`

Get a dated indicative exchange-rate quote. No money is moved.

Query: from, to (ISO currency codes), amount (decimal string). Returns estimated conversion and provider attribution; unavailable or stale rates return 422.

## Reminders

### `GET` `/api/reminders`

Lists reminders. Filter by status or search reminder content.

Query: optional status, query.

### `POST` `/api/reminders`

Creates a one-time or recurring email reminder.

Body: content, remind_at. Optional: timezone, frequency (once/minutely/hourly/daily/weekly/monthly/yearly), frequency_interval, weekday for weekly reminders, ends_at, document_id.

### `PATCH` `/api/reminders/{id}`

Edits, reschedules, pauses, or resumes a reminder.

Route param: id. Body: any reminder fields to change.

### `DELETE` `/api/reminders/{id}`

Cancels a reminder while preserving its delivery history.

Route param: id.

## Quizzes

### `GET` `/api/quizzes`

Lists grounded quizzes with each linked-source count and a small source preview.

Query: optional status and query. Search matches quiz titles and linked-source titles or summaries.

### `GET` `/api/quizzes/sources`

Lists saved items you can use as quiz sources, newest first.

Read scope. Query: optional query (matches titles and summaries), page. Returns 50 per page with has_more.

### `GET` `/api/quizzes/{id}/sources`

Lists every source currently linked to an owned quiz.

Route param: id.

### `POST` `/api/quizzes`

Creates a quiz grounded only in one or more saved items.

Body: title, document_ids (at least one; all selected items remain in one quiz), quiz_at. Optional: timezone, frequency (once/minutely/hourly/daily/weekly/monthly/yearly), frequency_interval, weekday for weekly quizzes, ends_at, question_mode, difficulty.

### `GET` `/api/quizzes/{id}/questions`

Lists delivered quiz questions and results newest first using cursor pagination.

Route param: id. Query: optional status (all/awaiting_answer/answered), per_page (1–100), cursor.

### `GET` `/api/quizzes/runs/{runId}`

Fetches one quiz question and its result. Correct answers remain hidden until answered.

Route param: runId.

### `PATCH` `/api/quizzes/{id}`

Edits, reschedules, pauses, resumes, or changes the source items of a quiz.

Route param: id. Body: any quiz fields to change. Use add_document_ids/remove_document_ids for incremental changes, or document_ids to replace the complete source set. At least one source must remain.

### `DELETE` `/api/quizzes/{id}`

Cancels a quiz while preserving its questions and results.

Route param: id.

### `POST` `/api/quizzes/runs/{runId}/answer`

Submits and grades one answer. Each quiz run accepts only one answer.

Route param: runId. Body: answer.
