Uphealth Templates API
Describe-only catalog of the live stream templates and their contracts.
Describe-only catalog of the live stream templates and their contracts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/uphealth-us:uphealth-us-templates-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Uphealth Signal Templates API
version: '1.0'
summary: The cued-stream messaging API — one call returns the next message for a patient sequence.
description: '**Signal** is a cued-stream messaging API. You create a *stream* (one patient
sequence), then advance it one *cue* at a time: each `POST .../cue` carries the
patient''s last response and returns the next message the engine selects, plus a
legal `_meta` block. The first cue is returned synchronously on create.
### The six endpoints
- `POST /streams` — create a stream; returns the opening cue.
- `GET /streams/{id}` — read a stream''s state and current cue (does not advance it).
- `POST /streams/{id}/cue` — submit feedback, receive the next cue. The first
cue is free; **every cue after the first requires feedback on the prior one**.
- `GET /sandbox-topics` — list the Discovery sandbox''s five curated topics.
- `GET /templates` — the live template catalog (read-only).
- `GET /templates/{id}` — one template''s patient-context contract.
There is no enroll endpoint (enrollment is implicit in create) and no close
endpoint.
### What the cue object carries
The cue object is the engine''s *selection*, and it carries two pieces of
decision metadata alongside the message:
- `receptivity` — an advisory float in `[0.0, 1.0]`: the engine''s estimate of
how receptive this patient is right now (`0.50` = at threshold, the
neutral state of a brand-new patient). Built from the patient''s own
feedback on the cues so far; it does not require any extra data.
- `safety` — the audience-safety verdict for the selected message: whether it
was `included` (and which audience tags admitted it) or would be
`filtered`. The engine applies the audience-tag gate to *choose* the
message; this object shows the provenance. It carries tags + the decision,
never PHI.
Every `200`/`201` also carries a `_meta` block (legal/disclosure surfaces).
### Display vs Deliver
- **Display** (default) — you render the cue in your own app. No PHI, no BAA,
self-serve. The Discovery sandbox is Display-only.
- **Deliver** — Uphealth sends on your behalf. BAA-gated at the PMPM tier and
above; requires the `stream:deliver` scope, which is **not** in the Discovery
bundle. The API is pull-only in both modes today; webhooks are planned for Deliver.
### Authentication & quota
Every request is authenticated with an HTTP Bearer key. Discovery (sandbox) keys
begin `up_sandbox_`; paid keys begin `up_live_`. The free Discovery tier is
capped at **50 cues per calendar month (UTC)** — exceeding it returns `429
over_quota` with an `upgrade_url`.'
contact:
name: Uphealth Signal — developer docs
url: https://uphealth.us/docs
x-source-of-truth: app/helpers/uphealth_us_docs_samples_helper.rb (verified 2026-05-30)
servers:
- url: https://api.uphealth.us/v1/signal
description: Signal v1 base URL. The docs render on uphealth.us; the API is a different host.
security:
- bearerAuth: []
tags:
- name: Templates
description: Describe-only catalog of the live stream templates and their contracts.
paths:
/templates:
get:
operationId: listTemplates
tags:
- Templates
summary: List the live stream templates
description: 'Enumerate the live stream templates and each one''s contract — the
audience-tag gate, the `patient_context_schema` a production create must
satisfy, the arc length, and the lifecycle thresholds. Describe-only and
identical for every tenant. The machine-readable companion to the
`/signal/templates` catalog; reads the same registry `POST /streams`
validates against, so it cannot drift.
**Required scope:** `stream:metadata` (in the Discovery bundle).'
x-required-scope: stream:metadata
responses:
'200':
description: The live template catalog.
content:
application/json:
schema:
$ref: '#/components/schemas/TemplateCatalog'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/templates/{id}:
get:
operationId: getTemplate
tags:
- Templates
summary: Describe one stream template
description: 'The contract for a single live template. Returns `404 not_found` for an
unknown or non-live template id.
**Required scope:** `stream:metadata` (in the Discovery bundle).'
x-required-scope: stream:metadata
parameters:
- name: id
in: path
required: true
schema:
type: string
description: The template id (e.g. `weight_glp1_initiation_30day`).
responses:
'200':
description: The template contract.
content:
application/json:
schema:
$ref: '#/components/schemas/TemplateDetail'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
TemplateSummary:
type: object
description: 'One live stream template''s contract: the audience-tag gate, the
patient_context schema a production create must satisfy, the arc length,
and the lifecycle thresholds. Drawn from the same registry `POST /streams`
validates against.
'
required:
- template_id
- display_name
- marketing_slug
- expected_duration_days
- audience_tags
- patient_context
- lifecycle
properties:
template_id:
type: string
display_name:
type: string
marketing_slug:
type: string
expected_duration_days:
type:
- integer
- 'null'
description: The arc length in days; null for an indefinite template.
audience_tags:
type: object
required:
- required
- optional
- excluded
properties:
required:
type: array
items:
type: string
optional:
type: array
items:
type: string
excluded:
type: array
items:
type: string
patient_context:
type: object
description: The §3.4 patient_context_schema, split into required + optional fields.
required:
- required
- optional
properties:
required:
type: array
items:
$ref: '#/components/schemas/PatientContextField'
optional:
type: array
items:
$ref: '#/components/schemas/PatientContextField'
lifecycle:
type: object
description: The §3.7 end-stream thresholds; each null when the template omits it.
required:
- day_of_stream_threshold
- consecutive_no_feedback_days_threshold
properties:
day_of_stream_threshold:
type:
- integer
- 'null'
consecutive_no_feedback_days_threshold:
type:
- integer
- 'null'
ErrorUnauthorized:
type: object
description: Missing, malformed, unknown, revoked, or expired key.
required:
- error
properties:
error:
type: string
enum:
- unauthorized
ErrorNotFound:
type: object
description: No such stream for this tenant (also returned for cross-tenant ids).
required:
- error
properties:
error:
type: string
enum:
- not_found
TemplateDetail:
type: object
description: The `200` body from `GET /templates/{id}` — one template's contract.
required:
- template
- _meta
properties:
template:
$ref: '#/components/schemas/TemplateSummary'
_meta:
$ref: '#/components/schemas/MetaBlock'
ErrorInsufficientScope:
type: object
description: The key is valid but lacks the scope this endpoint requires.
required:
- error
- required
properties:
error:
type: string
enum:
- insufficient_scope
required:
type: string
description: The scope the endpoint requires.
examples:
- stream:cue
PatientContextField:
type: object
description: One patient_context key the template accepts.
required:
- key
properties:
key:
type: string
type:
type: string
enum:
- enum
- integer
- boolean
- string
- date
validation:
type:
- string
- 'null'
description: The constraint — an enum's comma-separated allowed values, an integer `a..b` range, or free-form prose. Null when unconstrained.
TemplateCatalog:
type: object
description: The `200` body from `GET /templates` — the live template catalog.
required:
- templates
- _meta
properties:
templates:
type: array
items:
$ref: '#/components/schemas/TemplateSummary'
_meta:
$ref: '#/components/schemas/MetaBlock'
MetaBlock:
type: object
description: 'Legal/disclosure block returned on every `200`/`201`. Buyer-facing
surfaces — do not strip. The per-cue `receptivity` score + `safety`
verdict are NOT here — they live ON the cue object (see CueObject).
'
required:
- api_version
- no_medical_advice
- not_samd
- license_attribution
- delivery_mode
- sequencing_ip_notice
properties:
api_version:
type: string
description: The API version that produced this response.
examples:
- '1.0'
no_medical_advice:
type: boolean
description: Always `true`. The content is informational, not medical advice.
examples:
- true
not_samd:
type: boolean
description: Always `true`. Not Software as a Medical Device.
examples:
- true
license_attribution:
type: string
description: Content licensing attribution.
delivery_mode:
type: string
enum:
- display
- deliver
description: The stream's delivery mode.
sequencing_ip_notice:
type: string
description: IP notice covering the proprietary cueing decision.
responses:
Forbidden:
description: The key lacks the scope this endpoint requires.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInsufficientScope'
examples:
insufficient_scope:
value:
error: insufficient_scope
required: stream:cue
NotFound:
description: No such stream for this tenant.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorNotFound'
examples:
not_found:
value:
error: not_found
Unauthorized:
description: Missing, malformed, unknown, revoked, or expired key. Carries a `WWW-Authenticate` header.
headers:
WWW-Authenticate:
description: Always `Bearer realm="uphealth-api"`.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorUnauthorized'
examples:
unauthorized:
value:
error: unauthorized
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: Uphealth API key
description: "HTTP Bearer authentication. Send your Uphealth API key in the\n`Authorization` header: `Authorization: Bearer up_sandbox_…` (Discovery\nsandbox) or `Authorization: Bearer up_live_…` (paid tiers).\n\nEach key carries a set of scopes. The five scopes are:\n - `stream:create` — create a stream (POST /streams)\n - `stream:cue` — advance a stream (POST /streams/{id}/cue)\n - `stream:read` — read a stream (GET /streams/{id})\n - `stream:metadata` — read describe-only metadata (GET /sandbox-topics)\n - `stream:deliver` — Deliver-mode send (PMPM+; NOT in the Discovery bundle)\n\nDiscovery (sandbox) keys carry every scope **except** `stream:deliver`. A\nrequest missing the required scope returns `403 insufficient_scope`; a\nmissing, malformed, unknown, revoked, or expired key returns `401\nunauthorized` with a `WWW-Authenticate: Bearer realm=\"uphealth-api\"` header.\n"