create_patient_stream
Create a Signal cued stream for one patient and get the first cue back synchronously. Every cue is federally-sourced, audience-safety-checked, and sequenced on the patient's prior response — so your agent never fabricates health content. Choose a template_id from the signal://catalog resource and pre-satisfy its required audience_tags + patient_context (clinical templates 422 without them). Display mode renders in your app: no PHI, no BAA. Each later cue MUST submit the prior message's feedback — the engine refuses to advance without it (the sequencing moat).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attributes | No | De-identified patient context. v1 accepts free-form jsonb; future templates will enforce schemas. | |
| template_id | Yes | One of the live Signal templates. Read the signal://catalog resource for each template's required audience_tags + patient_context. On a production key a clinical template 422s if its required tags/context are missing — pre-satisfy them from the catalog. A free sandbox (Discovery) key always cues the curated sandbox corpus. | |
| audience_tags | No | Subset of the 14-tag B5/B6 schema. See list_sandbox_topics for sample topic labels. | |
| delivery_mode | No | v1 is Display-only; Deliver-mode unlocks at Per-Episode tier after BAA. | display |
| idempotency_key | No | Optional. Stripe-style create idempotency: a retried create with the same key returns the ORIGINAL stream instead of minting (and billing) a second one. Forwarded as the Idempotency-Key request header. UUID v4 recommended. | |
| feedback_timeout_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | Yes | Legal/disclosure block returned on every 2xx (A1 §6.7). | |
| state | Yes | ||
| first_cue | Yes | A cued message plus its per-cue receptivity score and audience-safety verdict. | |
| stream_id | Yes | Persist this — every later cue/read references it. | |
| rate_limit | No | Discovery monthly cue-cap headroom. Absent on non-Discovery tiers (no cap). | |
| next_cue_eligible_at | No |