{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/okareo/json-schema/okareo-inbox-message-request-schema.json",
  "title": "InboxMessageRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/okareo-inbox-api-openapi.yml#/components/schemas/InboxMessageRequest",
  "properties": {
    "address": {
      "$ref": "#/$defs/InboxAddress"
    },
    "body": {
      "type": "string",
      "maxLength": 4000,
      "minLength": 1,
      "title": "Body"
    },
    "channel": {
      "type": "string",
      "maxLength": 32,
      "minLength": 1,
      "title": "Channel",
      "description": "sms | email | push | app | any short label",
      "default": "sms"
    },
    "from": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "type": "null"
        }
      ],
      "title": "From",
      "description": "Display source: a number, a sender name, an email address."
    },
    "id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "type": "null"
        }
      ],
      "title": "Id",
      "description": "Idempotency key. A repeated id is acknowledged, not redelivered."
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Metadata"
    }
  },
  "type": "object",
  "required": [
    "address",
    "body"
  ],
  "$defs": {
    "InboxAddress": {
      "properties": {
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone",
          "description": "The caller ID the simulated caller dialed from (E.164 preferred)."
        },
        "context_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Context Token",
          "description": "The conversation's context token: the X-Okareo-Context-Token SIP header on SIP targets, or the session id your own endpoint returned."
        },
        "external_ref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "External Ref",
          "description": "A reference you chose per scenario row, bound via the target's inbox_external_ref template."
        }
      },
      "type": "object",
      "title": "InboxAddress",
      "description": "Exactly one way of naming the live conversation."
    }
  }
}