WordPress · JSON Structure

Wordpress Comment Structure

A WordPress comment object

Type: object Properties: 10
CMSContent ManagementOpen SourceWordPress

Comment is a JSON Structure definition published by WordPress, describing 10 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id post parent author author_name author_email date content status type

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wordpress/refs/heads/main/json-structure/wordpress-comment-structure.json",
  "name": "Comment",
  "description": "A WordPress comment object",
  "type": "object",
  "properties": {
    "id": {
      "type": "int32",
      "description": "Unique identifier for the comment",
      "example": 1
    },
    "post": {
      "type": "int32",
      "description": "The ID of the associated post",
      "example": 123
    },
    "parent": {
      "type": "int32",
      "description": "The ID for the parent of the comment",
      "example": 0
    },
    "author": {
      "type": "int32",
      "description": "The ID of the user object, if author was a user",
      "example": 0
    },
    "author_name": {
      "type": "string",
      "description": "Display name for the comment author",
      "example": "John Doe"
    },
    "author_email": {
      "type": "string",
      "format": "email",
      "description": "Email address for the comment author",
      "example": "john@example.com"
    },
    "date": {
      "type": "datetime",
      "description": "The date the comment was published",
      "example": "2026-04-16T08:00:00"
    },
    "content": {
      "$ref": "#/components/schemas/RenderedContent"
    },
    "status": {
      "type": "string",
      "description": "State of the comment",
      "enum": [
        "approved",
        "unapproved",
        "hold",
        "spam",
        "trash"
      ],
      "example": "approved"
    },
    "type": {
      "type": "string",
      "description": "Type of the comment",
      "example": "comment"
    }
  }
}