{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pingwa-dev/json-schema/pingwa-dev-notify-in-schema.json",
  "title": "NotifyIn",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pingwa-dev-openapi.json#/components/schemas/NotifyIn",
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 1024,
      "minLength": 1,
      "title": "Text"
    },
    "image_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Url"
    },
    "to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "To",
      "description": "Who gets it: \"me\" (default: the sending number's own phone), \"team\" (that number plus every active member) or a list of up to 25 member ids / names / \"me\". A send to the team or to members answers 202 {group_id, recipients: [{member_id, name, message_id, billing_class, status}], skipped}: no top-level `message_id` (use each recipient's own `message_id`)."
    },
    "ack": {
      "type": "boolean",
      "title": "Ack",
      "default": false
    },
    "escalate": {
      "anyOf": [
        {
          "items": {
            "properties": {
              "to": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "\"me\" or \"team\""
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "description": "member ids or names, and/or \"me\""
                  }
                ]
              },
              "after_s": {
                "type": "integer",
                "maximum": 21600.0,
                "minimum": 60.0,
                "description": "seconds after the original send; each step at least 60 s after the previous one"
              }
            },
            "additionalProperties": false,
            "type": "object",
            "required": [
              "to",
              "after_s"
            ]
          },
          "type": "array",
          "maxItems": 3,
          "minItems": 1
        },
        {
          "type": "string",
          "description": "a policy name (POST /v1/team/policies)"
        },
        {
          "type": "null"
        }
      ],
      "title": "Escalate",
      "description": "teams-04: escalate while nobody answers: steps [{\"to\", \"after_s\"}] (1-3) or a policy name. Responses add `escalation` [{step, state, due_at, reason}]; state: pending | sent | cancelled | stopped."
    },
    "actions": {
      "type": "array",
      "maxItems": 3,
      "title": "Actions",
      "description": "Alert buttons, up to 3: an action id of this number, \"ack\", \"snooze\" or {\"snooze\": minutes}. A snooze needs `topic`."
    },
    "topic": {
      "title": "Topic"
    },
    "ref": {
      "title": "Ref"
    }
  },
  "type": "object",
  "required": [
    "text"
  ]
}