{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/customer-io/json-schema/customer-io-sendsms-schema.json",
  "title": "sendsms",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/customer-io-send-messages-api-openapi.yml#/components/schemas/sendsms",
  "x-scalar-ignore": true,
  "allOf": [
    {
      "type": "object",
      "required": [
        "transactional_message_id",
        "identifiers"
      ],
      "properties": {
        "transactional_message_id": {
          "description": "The transactional message template that you want to use for your message. You can call the template by its numerical ID or by the *Trigger Name* that you assigned to the template in the UI (case insensitive).",
          "oneOf": [
            {
              "title": "ID (integer)",
              "type": "integer",
              "description": "The ID of the transactional message you want to send."
            },
            {
              "title": "Trigger Name (string)",
              "type": "string",
              "description": "The name of trigger for the transactional message you want to send; you set the trigger name in the *Configure Settings* step when setting up your message. This is case insensitive."
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "required": [
        "to"
      ],
      "properties": {
        "to": {
          "type": "string",
          "description": "The phone number you want to send your SMS to. Use E.164 format, like `+15551234567`, or Liquid if you store phone numbers as attributes."
        },
        "from": {
          "type": "string",
          "description": "The phone number or sender ID your SMS is from. It must be verified in your Twilio account. This overrides the template's sender. Use E.164 format for a phone number."
        },
        "tracked": {
          "type": "boolean",
          "default": true,
          "description": "Whether to track link clicks for this SMS. Defaults to the transactional message's own tracking setting."
        },
        "language": {
          "type": "string",
          "description": "Overrides language preferences for the person you want to send your transactional message to. Use one of our [supported two- or four-letter language codes](/journeys/channels/localization/getting-started/#supported-languages)."
        },
        "auto_create": {
          "type": "boolean",
          "default": false,
          "description": "If `true` and your `transactional_message_id` doesn't match a record, Customer.io creates an empty record using that value as the *Trigger Name*. The ID must be a string. If the name already belongs to another channel, the request fails with `400`, and numeric IDs ignore this setting. See [details](/journeys/transactional-email/#auto-create-transactional-message-records)."
        }
      }
    },
    {
      "$ref": "#/$defs/transactionalSharedObject"
    }
  ],
  "$defs": {
    "disable_message_retention": {
      "x-scalar-ignore": true,
      "type": "boolean",
      "default": false,
      "description": "If true, the message body is not retained in delivery history. Setting this value overrides the value set in the settings of your `transactional_message_id`."
    },
    "queue_draft": {
      "x-scalar-ignore": true,
      "type": "boolean",
      "description": "If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message.",
      "default": false
    },
    "send_to_unsubscribed": {
      "x-scalar-ignore": true,
      "type": "boolean",
      "default": true,
      "description": "If false, your message is not sent to unsubscribed recipients. Setting this value overrides the value set in the settings of your `transactional_message_id`."
    },
    "transactionalSharedObject": {
      "x-scalar-ignore": true,
      "type": "object",
      "properties": {
        "identifiers": {
          "description": "Identifies the person represented by your transactional message by one of, and only one of, `id`, `email`, or `cio_id`.",
          "oneOf": [
            {
              "title": "id",
              "type": "object",
              "required": [
                "id"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The identifier for the person represented by the transactional message. **NOTE**: If your workspace identifies people by email, use the `email` identifier instead.\n"
                }
              }
            },
            {
              "title": "email",
              "type": "object",
              "required": [
                "email"
              ],
              "properties": {
                "email": {
                  "type": "string",
                  "description": "The identifier for the person represented by the transactional message. Use this option if your workspace identifies people by email rather than by `id`."
                }
              }
            },
            {
              "title": "cio_id",
              "type": "object",
              "required": [
                "cio_id"
              ],
              "properties": {
                "cio_id": {
                  "type": "string",
                  "description": "A unique, immutable identifier for a person, set by Customer.io when you add a person."
                }
              }
            }
          ]
        },
        "message_data": {
          "type": "object",
          "description": "An object containing the key-value pairs referenced using liquid in your message.",
          "additionalProperties": {
            "x-additionalPropertiesName": "Liquid Data",
            "description": "Insert key-values that you want to reference in your message here."
          }
        },
        "send_at": {
          "type": "integer",
          "description": "A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately."
        },
        "disable_message_retention": {
          "$ref": "#/$defs/disable_message_retention"
        },
        "send_to_unsubscribed": {
          "$ref": "#/$defs/send_to_unsubscribed"
        },
        "queue_draft": {
          "$ref": "#/$defs/queue_draft"
        }
      }
    }
  }
}