API
Highlights
Sections
Retrieve Page Highlights
Description
Retrieves all highlights of a given URL, or a single highlight if highlight_id is passed
URL
/api/v1/highlight/
HTTP Method
GET
Path Parameters
None
Query Parameters
Either of the following should be provided as a query parameter:
- url(String): URL of page for which the highlights are retrieved
- highlight_id(String): Unique indentifier for a highlight
Data Parameters
None
Request Headers
- Content-Type: application/json
- Authorization: Bearer 
Response
- Status Code: 200
- Content-Type: application/json
- Schema/Example:
{
  "data": {
    "highlights": [
      {
        "item_id": 83,
        "source_url": "https://www.example.com/",
        "text": "This is the most important sentence",
        "color": "green",
        "note": null,
        "created": "2021-09-18T11:12:53.501465Z",
        "modified": "2021-09-18T11:12:53.501509Z"
      },
      {
        "item_id": 83,
        "source_url": "https://www.example.com/",
        "text": "Learn to highlight with this one weird trick",
        "color": "purple",
        "note": "Comment made on highlight",
        "created": "2021-09-18T11:12:53.501465Z",
        "modified": "2021-09-18T11:12:53.501509Z"
      }
    ],
    "count": 3,
    "previous": null,
    "next": null
  },
  "error": false,
  "errcode": 0,
  "errmsg": null,
  "status": 200
}
Search for Highlights
Description
Searches highlights using a given query string from either all of a user's highlights or only highlights on a specified URL
URL
/api/v1/highlight/
HTTP Method
GET
Path Parameters
None
Query Parameters
- q(String): The query string to search for (required)
- url(String): URL of page for which the highlights are searched for (optional)
Note: If url is provided, the search will be limited to only the highlights made by the user on the given URL. Otherwise, this endpoint will search all of a user's highlights.
Data Parameters
None
Request Headers
- Content-Type: application/json
- Authorization: Bearer 
Response
- Status Code: 200
- Content-Type: application/json
- Schema/Example: See "Retrieve Page Highlights"
Save Page Highlights
Description
Saves all highlights currently indicated on page
URL
/api/v1/highlight/
HTTP Method
POST
Path Parameters
None
Query Parameters
None
Data Parameters
- url(String): URL of page where highlight is made (required)
- title(String): Title of page where highlight is made (required)
- text(String): The highlighted text (required)
- color(String): Color of the highlight (optional)
- tweet(Boolean): Indicates if highlight is a tweet (optional)
- extra(Object): Key-value pairs of extra highlight details (optional)
- note(String): Note text taken for the highlight (optional)
Request Headers
- Content-Type: application/json
- Authorization: Bearer 
Response
- Status Code: 200
- Content-Type: application/json
- Schema/Example:
{
  "data": {
    "highlight_id": "694lcs4u",
    "highlight_link": "https://histre.com/highlights/user0001/694lcs4u/"
  },
  "error": false,
  "errcode": 0,
  "errmsg": null,
  "status": 200
}
Update a Highlight
Description
Updates the text and/or extra details of a highlight
URL
/api/v1/highlight/
HTTP Method
PATCH
Path Parameters
None
Query Parameters
None
Data Parameters
- highlight_id(String): ID of the highlight to update (required)
- text(String): The highlighted text (required)
- color(String): The color of highlighted text (required)
- extra(Object): Key-value pairs of extra highlight details (optional)
- note(String or null): Note text taken for the highlight (optional); to remove an existing note text, explicitly pass in- nullor an empty- ''string
Request Headers
- Content-Type: application/json
- Authorization: Bearer 
Response
- Status Code: 200
- Content-Type: application/json
- Schema/Example:
{
  "data": {},
  "error": false,
  "errcode": 0,
  "errmsg": null,
  "status": 200
}
Delete Highlight
Description
Deletes given note highlight
URL
/api/v1/highlight/
HTTP Method
DELETE
Path Parameters
None
Query Parameters
None
Data Parameters
- highlight_id(String): ID of the highlight to delete
Request Headers
- Content-Type: application/json
- Authorization: Bearer 
Response
- Status Code: 200
- Content-Type: application/json
- Schema/Example:
{
  "data": {},
  "error": false,
  "errcode": 0,
  "errmsg": null,
  "status": 200
}