View API key ↗

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.

{
  "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

PropertiesTypeDescription
idstringComment ID
typestringAlways comment
attributes.contentstringPlain-text fallback of the comment
attributes.htmlContentstringSanitized HTML body of the comment
attributes.attachmentobjectAttachment properties object with a url field, or null if none
attributes.statusstringModeration status. Can be "approved" or "pending_moderation"
attributes.createdAtstringDate and time when this comment was created. Formatted as an ISO 8601 date time string.
attributes.updatedAtstringDate and time when this comment was updated. Formatted as an ISO 8601 date time string.
relationships.authorobjectUser who created the comment. Only contains type and id as per JSON:API specification.
relationships.postobjectPost object that the comment belongs to. Only contains type and id as per JSON:API specification.

📝

Content requirements

At least one of htmlContent or attachment must be present. You can include both in a single comment.