{
  "$id": "https://intentschema.org/intents/communication/chat/message/react/v1.json",
  "fqdn": "org.intentschema.communication.chat.message.react.v1",
  "title": "React to chat message",
  "description": "Add or remove an emoji reaction on a chat message.",
  "payload": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
      "target",
      "object"
    ],
    "properties": {
      "target": {
        "$ref": "https://intentschema.org/common/target/v1.json"
      },
      "object": {
        "type": "object",
        "required": [
          "emoji"
        ],
        "properties": {
          "emoji": {
            "type": "string",
            "description": "Provider-recognized emoji name without colons (e.g., `thumbsup`)."
          },
          "remove": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "idempotency_key": {
        "type": "string"
      }
    }
  },
  "result": {
    "type": "object",
    "properties": {
      "external_id": {
        "type": "string"
      },
      "at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "examples": [
    {
      "name": "thumbs up",
      "value": {
        "target": {
          "system": "slack",
          "external_id": "msg_abc"
        },
        "object": {
          "emoji": "thumbsup"
        }
      }
    }
  ]
}
