{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/uphealth-us/json-schema/uphealth-us-create-stream-request-schema.json",
  "title": "CreateStreamRequest",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/uphealth-us-openapi.json#/components/schemas/CreateStreamRequest",
  "type": "object",
  "required": [
    "template_id"
  ],
  "properties": {
    "template_id": {
      "type": "string",
      "enum": [
        "general_wellness_daily",
        "relapse_prevention_90day",
        "diabetes_pharma_initiation_30day",
        "weight_glp1_initiation_30day",
        "heart_pharma_initiation_30day",
        "quit_smoking_90day",
        "hypertension_lifestyle_90day"
      ],
      "description": "Stream template id — one of the live catalog templates. The Discovery\nsandbox serves `general_wellness_daily` (the segment-agnostic default);\nthe pharma-initiation + behavioral templates cue the live corpus on\nproduction tiers. An unrecognized value returns `422 validation_failed`.\n"
    },
    "attributes": {
      "type": "object",
      "additionalProperties": true,
      "description": "Free-form patient context (stored as the stream's `patient_context`)\nthe engine may use to scope the corpus. No PHI is required in Display\nmode.\n"
    },
    "audience_tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Audience-safety inclusion tags scoping the corpus."
    },
    "delivery_mode": {
      "type": "string",
      "enum": [
        "display",
        "deliver"
      ],
      "default": "display",
      "description": "`display` (default) — you render the cue; no PHI, no BAA. `deliver` —\nUphealth sends; BAA-gated at PMPM+ and requires the `stream:deliver`\nscope (not in the Discovery bundle).\n"
    },
    "feedback_timeout_days": {
      "type": "integer",
      "default": 14,
      "minimum": 1,
      "description": "Days a cue may await feedback before timing out (Deliver-mode concern)."
    }
  }
}