Highlights Sync Guide
Highlight Sync API
When a user marks a highlight, send a POST request to your unique endpoint with a JSON body.
If there are failed requests due to network or other issues, include the failed highlights when the user marks a new highlight.
If there are failed requests due to network or other issues, include the failed highlights when the user marks a new highlight.
POST
https://readmomo.com/reader/{unique_app_id}
Headers
| Content-Type | application/json | Content Type |
| Authorization | Token USER_TOKEN | User's token from their profile page |
Body
{
"highlights": [
{
"title": "book title",
"author": "book author",
"chapter": "chapter title",
"context": "context including the highlight text",
"highlight": "highlight text",
"note": "note text",
"style": 0,
"position": 0,
"timestamp": 1711234567
}
]
}
| Parameter | Required | Description |
|---|---|---|
| title | Yes | Book title |
| author | Yes | Book author |
| chapter | Yes | Chapter title |
| context | No | Context including the selected highlight text |
| highlight | Yes | Selected highlight text |
| note | No | Note text |
| style | No | 0: default, 1: green, 2: blue, 3: orange, 4: pink, 5: purple |
| position | No | Highlight position in the book |
| timestamp | Yes | Highlight unix timestamp, in seconds |
Response
A successful request returns "ok" string in response body.
If the sync fails, the response body contains the error message.
If the sync fails, the response body contains the error message.