{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postplanify-com/json-schema/postplanify-com-comment-schema.json",
  "title": "Comment",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/postplanify-com-api-openapi.json#/components/schemas/Comment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Platform-native comment identifier. For Instagram, Facebook and Google Business this is a numeric string. For LinkedIn it is a URN (e.g. `urn:li:comment:(activity:12345,67890)`): **always URL-encode it** when placing it in a path parameter.\n"
    },
    "workspaceId": {
      "type": "string",
      "format": "uuid"
    },
    "parentCommentId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the comment this one is a reply to, or `null` for top-level comments."
    },
    "text": {
      "type": "string"
    },
    "username": {
      "type": "string",
      "description": "Commenter's username. LinkedIn does not expose commenter names through its Comments API: LinkedIn comments return `\"LinkedIn User\"` unless the commenter is the connected account itself.\n"
    },
    "platformUserId": {
      "type": [
        "string",
        "null"
      ]
    },
    "profilePictureUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "When the comment was posted on the platform."
    },
    "likeCount": {
      "type": "integer"
    },
    "replyCount": {
      "type": "integer",
      "description": "Number of direct replies (nested comments)."
    },
    "isHidden": {
      "type": "boolean",
      "description": "Whether the comment is hidden on the platform. Only Instagram and Facebook support hiding."
    },
    "isRead": {
      "type": "boolean",
      "description": "Internal read state in PostPlanify. Not reflected on the platform."
    },
    "brandReplied": {
      "type": "boolean",
      "description": "True if you have already replied to this comment through PostPlanify."
    },
    "rating": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Star rating (1–5). Only set for Google Business reviews; `null` for other platforms."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "socialAccount": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "platform": {
          "$ref": "#/$defs/SocialPlatform"
        },
        "accountName": {
          "type": "string"
        },
        "profilePictureUrl": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "post": {
      "type": [
        "object",
        "null"
      ],
      "description": "The post (or review target) this comment is attached to.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Platform-native post ID."
        },
        "platform": {
          "$ref": "#/$defs/SocialPlatform"
        },
        "mediaType": {
          "type": [
            "string",
            "null"
          ]
        },
        "permalink": {
          "type": [
            "string",
            "null"
          ]
        },
        "mediaUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "caption": {
          "type": [
            "string",
            "null"
          ]
        },
        "postedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    }
  },
  "$defs": {
    "SocialPlatform": {
      "type": "string",
      "enum": [
        "FACEBOOK",
        "INSTAGRAM",
        "X",
        "LINKEDIN",
        "TIKTOK",
        "YOUTUBE",
        "THREADS",
        "BLUESKY",
        "PINTEREST",
        "GOOGLE_BUSINESS",
        "TELEGRAM"
      ]
    }
  }
}