{
  "$id": "https://intentschema.org/profiles/com.microsoft.teams/communication.chat.message.send.v1.json",
  "id": "org.intentschema.communication.chat.message.send.v1@com.microsoft.teams.v1",
  "pins": "https://intentschema.org/intents/communication/chat/message/send/v1.json",
  "title": "Microsoft Teams chat message send profile",
  "description": "Profile for posting messages via Microsoft Graph Teams (chats/{id}/messages). Adds Teams-specific mentions and formatting.",
  "constraints": {
    "properties": {
      "target": {
        "properties": {
          "system": {
            "const": "ms_teams"
          }
        },
        "required": [
          "system"
        ]
      },
      "ms_teams": {
        "type": "object",
        "properties": {
          "importance": {
            "enum": [
              "normal",
              "high",
              "urgent"
            ]
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              }
            }
          },
          "subject": {
            "type": "string"
          }
        }
      }
    }
  },
  "api": {
    "method": "POST",
    "path": "/v1.0/chats/{chatId}/messages",
    "scopes": [
      "ChatMessage.Send"
    ],
    "docs": "https://learn.microsoft.com/en-us/graph/api/chat-post-messages",
    "params": {
      "object.channel_id": "chatId (or teamId/channelId for channel messages)",
      "object.text": "body.content",
      "ms_teams.mentions": "mentions[] (with id + displayName + mentioned.user.id)",
      "ms_teams.importance": "importance",
      "ms_teams.subject": "subject"
    },
    "base_url": "https://graph.microsoft.com"
  }
}
