Highlight a passage
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.
/v1/cards/{cardId}/highlightsAuthorizationBearer token (OAuth access token or teakapi_ API key) · headerrequiredBearer token. Accepts either an OAuth 2.0 access token (obtained via browser sign-in; expires after 1 hour and is refreshable) or a teakapi_ API key.
cardIdstringrequiredapplication/jsonquotestringrequiredText from the card's article, at most 5,000 characters. Whitespace, curly quotes, dash styles and case don't need to match.
notestringAt most 2,000 characters.
prefixstringText just before the quote, to pick one of its repeats. Without it, or suffix, the first match is highlighted.
suffixstringText just after the quote, to pick one of its repeats.
The passage was highlighted already, or the new highlight merged with one it overlapped
idstringrequiredcardIdstringrequiredquotestringrequiredThe highlighted text.
notestring | nullrequiredanchoredbooleanrequiredFalse while Teak hasn't found the quote in the card's saved article: an imported highlight waiting for the article, or one the article doesn't have.
sourcestringrequiredWhere it was made: in Teak's reader, through this API, or by an import. Clients should accept values they don't know.
readerapiimportcreatedAtnumberrequiredupdatedAtnumberrequiredHighlight created
idstringrequiredcardIdstringrequiredquotestringrequiredThe highlighted text.
notestring | nullrequiredanchoredbooleanrequiredFalse while Teak hasn't found the quote in the card's saved article: an imported highlight waiting for the article, or one the article doesn't have.
sourcestringrequiredWhere it was made: in Teak's reader, through this API, or by an import. Clients should accept values they don't know.
readerapiimportcreatedAtnumberrequiredupdatedAtnumberrequiredINVALID_INPUT: no quote, or a quote or note too long
codestringrequirederrorstringrequiredretryAtnumber | nullCard not found
codestringrequirederrorstringrequiredretryAtnumber | nullNO_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
codestringrequirederrorstringrequiredretryAtnumber | nullQUOTE_NOT_FOUND: the article doesn't have the quote
codestringrequirederrorstringrequiredretryAtnumber | nullRATE_LIMITED
codestringrequirederrorstringrequiredretryAtnumber | null