TTWrite API Documentation: bookmarks Endpoint

This document provides details on using the bookmarks endpoint to manage and retrieve bookmarks in the TTWrite API.


Navigation Overview

The bookmarks endpoint includes two functionalities:

  1. Get Bookmarks – Retrieve a list of user bookmarks.
  2. Add Bookmark – Toggle bookmarking for a specific post.

Functionalities of the bookmarks Endpoint

1. Get Bookmarks

API Endpoint

  • URL: mobile_api/get_bookmarks

Description

Retrieve a list of bookmarks for the authenticated user.

Get Parameters

FieldValueRemarks
session_idAccess token IDExample: de25cc16eb00960f076...
page_sizeTotal post limit per requestRecommended: 20
offsetOffset for paginationUse the ID of the last post retrieved

2. Add Bookmark / Unbookmark

API Endpoint

  • URL: mobile_api/add_bookmark

Description

Toggle the bookmark status of a post. The first call bookmarks the post, and the second call removes the bookmark.

Post Parameters

FieldValueRemarks
session_idAccess token IDExample: de25cc16eb00960f076...
post_idInteger ID of the postExample: 4567

Notes

  • Ensure the session_id is valid and corresponds to the authenticated user.
  • For get_bookmarks, implement pagination using page_size and offset.
  • The add_bookmark API operates as a toggle for bookmarking and unbookmarking posts.