---
updatedAt: 2026-09-11T07:29:29.000Z
agentTools:
  projectIndex: https://docs.padlet.dev/llms.txt
---

# Comment

A comment object contains information about an individual comment. It contains relationships to a post, a user and attachment.

An example of a comment object is displayed below.

```json Example comment object
{
  "id": "comment_1234abcd",
  "type": "comment",
  "attributes": {
    "content": "Great point, thanks for sharing!",
    "htmlContent": "<p>Great point, thanks for sharing!</p>",
    "attachment": {
      "url": "https://cdn.padlet.dev/uploads/image.png"
    },
    "status": "approved",
    "createdAt": "2025-01-17T12:34:56Z",
    "updatedAt": "2025-01-17T12:34:56Z"
  },
  "relationships": {
    "author": {
      "data": {
        "id": "user_abcd1234efgh5678",
        "type": "user"
      }
    },
    "post": {
      "data": {
        "id": "post_lkROZPOe62X2QjMg",
        "type": "post"
      }
    }
  }
}
```

## Comment object properties

| Properties               | Type     | Description                                                                                                                                                  |
| :----------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                     | `string` | Comment ID                                                                                                                                                   |
| `type`                   | `string` | Always `comment`                                                                                                                                             |
| `attributes.content`     | `string` | Plain-text fallback of the comment                                                                                                                           |
| `attributes.htmlContent` | `string` | Sanitized HTML body of the comment                                                                                                                           |
| `attributes.attachment`  | `object` | Attachment properties object with a `url` field, or `null` if none                                                                                           |
| `attributes.status`      | `string` | Moderation status. Can be `"approved"` or `"pending_moderation"`                                                                                             |
| `attributes.createdAt`   | `string` | Date and time when this comment was created. Formatted as an <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 date time</a> string. |
| `attributes.updatedAt`   | `string` | Date and time when this comment was updated. Formatted as an <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 date time</a> string. |
| `relationships.author`   | `object` | User who created the comment. Only contains `type` and `id` as per JSON:API specification.                                                                   |
| `relationships.post`     | `object` | Post object that the comment belongs to. Only contains `type` and `id` as per JSON:API specification.                                                        |

<Callout icon="📝" theme="default">
  ### Content requirements

  At least one of `htmlContent` or `attachment` must be present. You can include both in a single comment.
</Callout>