---
search:
  tags:
    - Operations
    - POST
seo:
  description: >-
    Finds the quote in the card's saved article and highlights it: the first…
    Reference for the POST /v1/cards/{cardId}/highlights endpoint in the Teak
    API.
sidebar:
  label: Highlight a passage
  badge: POST
title: Highlight a passage
type: openapi-operation
---
Finds the quote in the card's saved article and highlights it: the first match, unless `prefix` or `suffix` points at another. A passage that overlaps a highlight merges with it, keeping the older note. A card holds up to 200 highlights, and a highlighted link keeps its saved copy and article: Refresh details and saving it again no longer replace them.

`POST /v1/cards/{cardId}/highlights`

**Request body** (`application/json`, required)

- `quote` (string, required) — Text from the card's article, at most 5,000 characters. Whitespace, curly quotes, dash styles and case don't need to match.
- `note` (string) — At most 2,000 characters.
- `prefix` (string) — Text just before the quote, to pick one of its repeats. Without it, or \`suffix\`, the first match is highlighted.
- `suffix` (string) — Text just after the quote, to pick one of its repeats.

Request body example:

```json
{
  "quote": "string",
  "note": "string",
  "prefix": "string",
  "suffix": "string"
}
```

**Responses**

- `200` — The passage was highlighted already, or the new highlight merged with one it overlapped
- `201` — Highlight created
- `400` — INVALID\_INPUT: no quote, or a quote or note too long
- `404` — Card not found
- `409` — NO\_ARTICLE: the card isn't a link with a saved article, or is in Trash. HIGHLIGHT\_LIMIT: the card has 200 highlights. CONFLICT: the card's saved article changed while the quote was being found; try again
- `422` — QUOTE\_NOT\_FOUND: the article doesn't have the quote
- `429` — RATE\_LIMITED

Response example, 200:

```json
{
  "id": "string",
  "cardId": "string",
  "quote": "string",
  "note": "string",
  "anchored": true,
  "source": "reader",
  "createdAt": 0,
  "updatedAt": 0
}
```
