Comments REST API

The Comments REST API allows users to interact with comment threads within documents. This includes operations such as retrieving threads, creating or deleting individual comments, and updating comments or threads.

Explore the Comments Postman Collection for a hands-on experience, allowing you to experiment with the REST API's capabilities.

Use Cases

  • Thread Management: Create or delete discussion threads linked to specific parts of a document.
  • Comment Management: Add, update, or remove comments within these threads to facilitate discussion.

Endpoints

  • Get Threads: Retrieves all comment threads associated with a document.
  • Get Thread: Retrieves a specific comment thread within a document using its unique identifier.
  • Create Thread: Creates a new comment thread within a document.
  • Update Thread: Updates attributes of an existing thread, such as marking it as resolved.
  • Delete Thread: Removes a specific comment thread from a document.
  • Create Comment: Adds a new comment to an existing thread within a document.
  • Update Comment: Modifies the content of an existing comment within a thread.
  • Delete Comment: Removes a specific comment from a thread within a document. For a comprehensive overview of the REST API, including all its functionalities and specifications, please refer to the Comments Postman Collection.

Examples

Creating a Comment Thread:

POST /documents/:identifier/threads
{
    "content": "Discussion topic",
    "data": { "key": "value" }
}

Adding a Comment to a Thread:

POST /documents/:identifier/threads/:threadIdentifier/comments/
{
    "content": "This is a comment",
    "data": { "key": "value" }
}

Deleting a Comment from a Thread:

DELETE /documents/:identifier/threads/:threadIdentifier/comments/:commentIdentifier

Note

Replace :identifier with the document's unique ID. Replace :threadIdentifier with the thread's unique ID within the document. Replace :commentIdentifier with the comment's unique ID within a thread for operations that target a specific comment.