{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-feed-element-input-schema.json",
  "title": "FeedElementInput",
  "description": "Input for creating a feed element",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-feeds-api-openapi.yml#/components/schemas/FeedElementInput",
  "type": "object",
  "required": [
    "body",
    "feedElementType",
    "subjectId"
  ],
  "properties": {
    "body": {
      "$ref": "#/$defs/MessageBodyInput"
    },
    "feedElementType": {
      "type": "string",
      "description": "Type of feed element to create",
      "enum": [
        "FeedItem"
      ]
    },
    "subjectId": {
      "type": "string",
      "description": "ID of the parent record for the post"
    }
  },
  "$defs": {
    "MessageBodyInput": {
      "type": "object",
      "description": "Input for a message body",
      "properties": {
        "messageSegments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageSegmentInput"
          }
        }
      }
    },
    "MessageSegmentInput": {
      "type": "object",
      "description": "Input for a message segment",
      "properties": {
        "text": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "Text",
            "Mention",
            "Hashtag"
          ]
        }
      }
    }
  }
}