{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-send-message-request-schema.json",
  "title": "SendMessageRequest",
  "description": "Represents the properties of a send message request.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-communication-services-sms-api-openapi.yml#/components/schemas/SendMessageRequest",
  "required": [
    "message",
    "smsRecipients",
    "from"
  ],
  "type": "object",
  "properties": {
    "from": {
      "description": "The sender's phone number in E.164 format that is owned by the authenticated account.",
      "type": "string"
    },
    "smsRecipients": {
      "description": "The recipient's phone number in E.164 format. In this version, a minimum of 1 and upto 100 recipients in the list are supported.",
      "maxLength": 100,
      "minLength": 1,
      "type": "array",
      "items": {
        "$ref": "#/$defs/SmsRecipient"
      }
    },
    "message": {
      "description": "The contents of the message that will be sent to the recipient. The allowable content is defined by RFC 5724.",
      "maxLength": 2048,
      "minLength": 0,
      "type": "string"
    },
    "smsSendOptions": {
      "$ref": "#/$defs/SmsSendOptions"
    }
  },
  "$defs": {
    "MessagingConnectOptions": {
      "description": "Defines optional parameters for connecting with the Messaging Connect Partner to deliver SMS.",
      "required": [
        "partner",
        "partnerParams"
      ],
      "type": "object",
      "properties": {
        "partner": {
          "description": "Specifies the partner name for message delivery.",
          "type": "string"
        },
        "partnerParams": {
          "description": "Partner-specific parameters as key-value pairs. Must contain at least one parameter required by the messaging connect partner (e.g., apiKey, servicePlanId, authToken, etc.).",
          "type": "object",
          "minProperties": 1
        }
      }
    },
    "SmsRecipient": {
      "description": "Recipient details for sending SMS messages.",
      "required": [
        "to"
      ],
      "type": "object",
      "properties": {
        "to": {
          "description": "The recipient's phone number in E.164 format.",
          "type": "string"
        },
        "repeatabilityRequestId": {
          "description": "If specified, the client directs that the request is repeatable; that is, the client can make the request multiple times with the same Repeatability-Request-ID and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-ID is an opaque string representing a client-generated, 36-character hexadecimal case-insensitive encoding of a UUID (GUID), identifier for the request.",
          "type": "string"
        },
        "repeatabilityFirstSent": {
          "description": "MUST be sent by clients to specify that a request is repeatable. Repeatability-First-Sent is used to specify the date and time at which the request was first created.eg- Tue, 26 Mar 2019 16:06:51 GMT",
          "type": "string"
        }
      }
    },
    "SmsSendOptions": {
      "description": "Optional configuration for sending SMS messages.",
      "required": [
        "enableDeliveryReport"
      ],
      "type": "object",
      "properties": {
        "enableDeliveryReport": {
          "description": "Enable this flag to receive a delivery report for this message on the Azure Resource EventGrid.",
          "type": "boolean"
        },
        "tag": {
          "description": "Use this field to provide metadata that will then be sent back in the corresponding Delivery Report.",
          "type": "string"
        },
        "deliveryReportTimeoutInSeconds": {
          "format": "int32",
          "description": "Time to wait for a delivery report. After this time a delivery report with timeout error code is generated.",
          "maximum": 43200,
          "minimum": 60,
          "type": "integer"
        },
        "messagingConnect": {
          "$ref": "#/$defs/MessagingConnectOptions"
        }
      }
    }
  }
}