{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/customer-io/json-schema/customer-io-sendinapp-schema.json",
  "title": "sendinapp",
  "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/sendinapp",
  "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."
            }
          ]
        },
        "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 the format `{{trigger.<property_name>}}` in your in-app message. These values populate the `properties` field in the message that the SDK delivers to your application.",
          "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."
        },
        "queue_draft": {
          "$ref": "#/$defs/queue_draft"
        },
        "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": "Accepted for in-app sends, but of limited use. An auto-created record has no content or layout until you populate it in the UI, so we recommend [creating the in-app message in the UI](/journeys/send/transactional/in-app/) instead. Your `transactional_message_id` must be a new string."
        }
      }
    }
  ],
  "$defs": {
    "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
    }
  }
}