Back to Karakeep

Update a highlight

docs/versioned_docs/version-v0.31.0/api/update-highlight.api.mdx

0.31.02.4 KB
Original Source

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading";

<Heading as={"h1"} className={"openapi__heading"} children={"Update a highlight"}

</Heading>

<MethodEndpoint method={"patch"} path={"/highlights/{highlightId}"} context={"endpoint"}

</MethodEndpoint>

Partially update a highlight. Supports changing the color or note.

<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}

</Heading>

<ParamsDetails parameters={[{"schema":{"type":"string","description":"The unique identifier of the highlight.","example":"ieidlxygmwj87oxz5hxttoc8","title":"HighlightId"},"required":true,"name":"highlightId","in":"path"}]}

</ParamsDetails>

<RequestSchema title={"Body"} body={{"description":"The fields to update. Only the fields you want to change need to be provided.","content":{"application/json":{"schema":{"type":"object","properties":{"color":{"type":"string","enum":["yellow","red","green","blue"]},"note":{"type":"string","nullable":true}}}}}}}

</RequestSchema>

<StatusCodes id={undefined} label={undefined} responses={{"200":{"description":"The updated highlight.","content":{"application/json":{"schema":{"type":"object","properties":{"bookmarkId":{"type":"string"},"startOffset":{"type":"number"},"endOffset":{"type":"number"},"color":{"type":"string","enum":["yellow","red","green","blue"],"default":"yellow"},"text":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"id":{"type":"string"},"userId":{"type":"string"},"createdAt":{"type":"string"}},"required":["bookmarkId","startOffset","endOffset","text","note","id","userId","createdAt"],"title":"Highlight"}}}},"401":{"description":"Unauthorized — the Bearer token is missing, invalid, or expired.","content":{"text/plain":{"schema":{"type":"string","example":"Unauthorized"}}}},"404":{"description":"Highlight not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable error message."}},"required":["code","message"],"title":"Error"}}}}}}

</StatusCodes>