Mark a passage in an item
text is the passage as it appears in the item's text; prefix and suffix (the words just before and
after it) let a client find it again after the text changes, and offset says where to look first. A
user keeps at most 500 annotations on one item (409 annotation.item_limit). Refused while the library is
read-only over its plan's limits. An API key needs write access to items.
An annotation is not a quote: it stays on its item and is not a card in the feed. To save a passage as an
item of its own, create a quote.
bearerAuthorizationBearer <token>A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
id*stringapplication/json- body
text*stringNot blank.
1 <= length <= 5000prefix?stringlength <= 200suffix?stringlength <= 200offset?integerCharacter offset into the item's text.
0 <= valuecolor?AnnotationColor"yellow""yellow""green""blue""pink"note?stringBlank is saved as null.
length <= 10000Created
application/json- response
id*stringitem_id*stringtext*stringThe marked passage.
prefix*stringThe words just before the passage, to find it again; may be empty.
suffix*stringThe words just after the passage; may be empty.
offset*|Where the passage was in the item's text when it was marked.
0 <= valuecolor*AnnotationColor"yellow""yellow""green""blue""pink"note*string|nullcreated_at*stringdate-timeupdated_at*stringdate-timeitem?The item it is in. In lists across items and single reads; left out in an item's own list.
curl -X POST 'https://example.com/v1/items/string/annotations' \ -H 'Content-Type: application/json' \ -d '{ "text": "string"}'{ "id": "string", "item_id": "string", "text": "string", "prefix": "string", "suffix": "string", "offset": 0, "color": "yellow", "note": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "item": { "id": "string", "kind": "string", "title": "string", "url": "string", "domain": "string" }}List the caller's annotations on an item GET
In reading order: by `offset` where known, then oldest first. Each reader has their own annotations: the item's owner, and the owner or accepted members of a list the item is in. Anyone else gets 404, as for a deleted item. An API key needs read access to `items`.
List the caller's annotations across items GET
Newest first, each with the item it is in, on items the caller can still read. An API key needs read access to `items`.