{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-sales-cloud/json-schema/salesforce-sales-cloud-feed-element-schema.json",
  "title": "FeedElement",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-sales-cloud-feed-items-api-openapi.yml#/components/schemas/FeedElement",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "body": {
      "$ref": "#/$defs/MessageBody"
    },
    "capabilities": {
      "type": "object",
      "properties": {
        "comments": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer"
            }
          }
        },
        "chatterLikes": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer"
            }
          }
        }
      }
    },
    "createdDate": {
      "type": "string",
      "format": "date-time"
    },
    "actor": {
      "$ref": "#/$defs/UserSummary"
    },
    "feedElementType": {
      "type": "string",
      "enum": [
        "FeedItem",
        "Bundle"
      ]
    },
    "header": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        }
      }
    },
    "parent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "type": {
      "type": "string"
    },
    "url": {
      "type": "string"
    }
  },
  "$defs": {
    "MessageBody": {
      "type": "object",
      "properties": {
        "messageSegments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Text",
                  "Mention",
                  "Hashtag",
                  "Link"
                ]
              },
              "text": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "UserSummary": {
      "type": "object",
      "properties": {
        "companyName": {
          "type": [
            "string",
            "null"
          ]
        },
        "displayName": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "photo": {
          "type": "object",
          "properties": {
            "smallPhotoUrl": {
              "type": "string"
            },
            "mediumPhotoUrl": {
              "type": "string"
            }
          }
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}