{
  "$id": "https://intentschema.org/profiles/com.microsoft.graph/communication.email.message.send.v1.json",
  "id": "org.intentschema.communication.email.message.send.v1@com.microsoft.graph.v1",
  "pins": "https://intentschema.org/intents/communication/email/message/send/v1.json",
  "title": "Microsoft Graph (Outlook) email send profile",
  "description": "Profile for sending email via the Microsoft Graph /sendMail endpoint. Pins target.system to `ms_graph`, bounds attachment size, and adds Outlook-specific importance and delivery options.",
  "constraints": {
    "properties": {
      "target": {
        "properties": {
          "system": {
            "const": "ms_graph"
          }
        },
        "required": [
          "system"
        ]
      },
      "object": {
        "properties": {
          "attachments": {
            "items": {
              "properties": {
                "size": {
                  "maximum": 157286400
                }
              }
            }
          }
        }
      },
      "ms_graph": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "description": "Graph conversation id; set when this send belongs to an existing conversation."
          },
          "importance": {
            "enum": [
              "low",
              "normal",
              "high"
            ]
          },
          "requestDeliveryReceipt": {
            "type": "boolean"
          },
          "requestReadReceipt": {
            "type": "boolean"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "api": {
    "method": "POST",
    "path": "/v1.0/me/sendMail",
    "scopes": [
      "Mail.Send"
    ],
    "docs": "https://learn.microsoft.com/en-us/graph/api/user-sendmail",
    "params": {
      "object.to": "message.toRecipients[].emailAddress.address",
      "object.cc": "message.ccRecipients[].emailAddress.address",
      "object.bcc": "message.bccRecipients[].emailAddress.address",
      "object.from": "message.from.emailAddress.address",
      "object.subject": "message.subject",
      "object.textBody": "message.body.content (contentType: text)",
      "object.htmlBody": "message.body.content (contentType: html)",
      "object.attachments": "message.attachments[] (base64 or reference)",
      "idempotency_key": "Prefer: IdType='ImmutableId' header or client-supplied internetMessageId",
      "ms_graph.conversationId": "message.conversationId",
      "ms_graph.importance": "message.importance",
      "ms_graph.requestDeliveryReceipt": "message.isDeliveryReceiptRequested",
      "ms_graph.requestReadReceipt": "message.isReadReceiptRequested",
      "ms_graph.categories": "message.categories[]"
    },
    "base_url": "https://graph.microsoft.com"
  }
}
