{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/twilio/main/json-schema/twilio-create-message-request-schema.json",
  "title": "CreateMessageRequest",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twilio-messages-api-openapi.yml#/components/schemas/CreateMessageRequest",
  "type": "object",
  "required": [
    "To"
  ],
  "properties": {
    "To": {
      "type": "string",
      "description": "Recipient phone number in E.164 format"
    },
    "From": {
      "type": "string",
      "description": "Twilio phone number, short code, or alphanumeric sender ID"
    },
    "Body": {
      "type": "string",
      "description": "The text content of the message (max 1600 characters)",
      "maxLength": 1600
    },
    "MessagingServiceSid": {
      "type": "string",
      "description": "SID of the messaging service to use",
      "pattern": "^MG[0-9a-fA-F]{32}$"
    },
    "MediaUrl": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      },
      "description": "URLs of media to include in MMS messages (max 10)",
      "maxItems": 10
    },
    "StatusCallback": {
      "type": "string",
      "format": "uri",
      "description": "URL for status callback notifications"
    },
    "MaxPrice": {
      "type": "number",
      "description": "Maximum price in USD to pay for the message"
    },
    "ValidityPeriod": {
      "type": "integer",
      "description": "Validity period in seconds (max 14400)",
      "maximum": 14400
    },
    "SendAt": {
      "type": "string",
      "format": "date-time",
      "description": "Time to send a scheduled message (requires messaging service)"
    },
    "ScheduleType": {
      "type": "string",
      "enum": [
        "fixed"
      ],
      "description": "Schedule type for scheduled messages"
    },
    "ContentSid": {
      "type": "string",
      "description": "SID of a content template to use",
      "pattern": "^HX[0-9a-fA-F]{32}$"
    },
    "ContentVariables": {
      "type": "string",
      "description": "JSON string of variables for content templates"
    }
  }
}