{
  "$id": "https://intentschema.org/intents/communication/chat/channel/create/v1.json",
  "fqdn": "org.intentschema.communication.chat.channel.create.v1",
  "title": "Create chat channel",
  "description": "Create a new channel or group conversation.",
  "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": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "private": {
            "type": "boolean",
            "default": false
          },
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User identifiers to add at creation."
          },
          "topic": {
            "type": "string"
          }
        }
      },
      "idempotency_key": {
        "type": "string"
      }
    }
  },
  "result": {
    "type": "object",
    "required": [
      "external_id",
      "created_at"
    ],
    "properties": {
      "external_id": {
        "type": "string",
        "description": "Provider-assigned id."
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "examples": [
    {
      "name": "private channel",
      "value": {
        "target": {
          "system": "slack"
        },
        "object": {
          "name": "incident-2026-q2",
          "private": true
        }
      }
    }
  ]
}
