---
title: "Instant JSON schema for PDF comments | Nutrient Document Engine"
canonical_url: "https://www.nutrient.io/guides/nodejs/json/schema/comments/"
md_url: "https://www.nutrient.io/guides/nodejs/json/schema/comments.md"
last_updated: "2026-05-14T16:53:43.896Z"
description: "Learn to use Instant JSON with comments for real-time collaboration in documents, enhancing communication and efficiency."
---

# Streamline document discussions with Instant Comments

<!-- Common header for Instant JSON Schema articles -->

## Types

This section explains how to use type declarations in Instant JSON records.

The optional keys are specified as follows:

```js

{ optionalKey?: value; }

```

To reduce payload size, omit optional keys when their values are undefined.

## Comments

The [Instant Comments](https://www.nutrient.io/guides/web/annotations/comments-and-replies/comments.md) component enables users to collaborate on and discuss parts of a document in real time. You can use the Document Engine [comments APIs](https://www.nutrient.io/api/reference/document-engine/upstream/#tag/Comments) to add and retrieve comments in a document:

### JSON

```json

// Example of an Instant JSON schema including a comment associated with the annotation identified by `rootId`:
{
	"type": "pspdfkit/comment",
	"v": 1,
	"rootId": "01F46WTF5X3J1WEN6J2YXWHHEW",
	"pageIndex": 0,
	"pdfObjectId": null,
	"creatorName": null,
	"createdAt": "2021-04-26T10:50:30.650Z",
	"updatedAt": "2021-04-26T10:50:30.650Z",
	"text": "This is a comment.",
	"customData": null
}

```

### JAVASCRIPT

```js

type Comment = {
  // The comment text.
  text: string
  // The name of the comment author.
  creatorName?: string,
  // The date of the comment creation.
  createdAt?: Timestamp,
  // The date of the last comment update.
  updatedAt?: Timestamp,
  // Custom attributes of the comment.
  customData?: { [key: string]: any }
}

```

Annotation Replies aren’t supported in Instant&nbsp;JSON.

For more information about the Instant JSON schema for annotations, refer to the [JSON format schema — annotations](https://www.nutrient.io/../annotations/) guide.
---

## Related pages

- [Understanding Instant JSON attachments and schemas](/guides/nodejs/json/schema/file-attachments.md)
- [Create and manage PDF bookmarks with Instant JSON](/guides/nodejs/json/schema/bookmarks.md)
- [Understanding Instant JSON action types](/guides/nodejs/json/schema/actions.md)
- [Sync PDF form field values using Instant JSON](/guides/nodejs/json/schema/form-field-values.md)
- [Effective guidelines for PDF form field types](/guides/nodejs/json/schema/form-fields.md)
- [Instant JSON format for PDF annotations explained](/guides/nodejs/json/schema/annotations.md)

