Skip to content

Diagrams

Auth: API key. Scope: diagrams:read

Base path: /v1/diagrams

A diagram is a care pathway. Blueprints and instances are both Diagram objects, distinguished by a type:

TypeWhat it isHow it is created
blueprintThe pathway template (swimlanes, nodes, links)In the MedFlow UI only
instanceA copy of a blueprint, made to be runWhen a run starts

Every diagram has its own id. On an instance, sourceId is the blueprint it was copied from. A run’s runId is the id of its instance.

The Diagrams API is read-only. Create, edit, rename, and delete pathways in the MedFlow UI. Use this API to list and fetch diagram metadata.


GET /v1/diagrams

bash
curl "https://api-staging.medflow.care/v1/diagrams" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"
QueryDescription
typeOptional. blueprint or instance. Defaults to blueprint
sourceIdOptional. Instances copied from this blueprint
qOptional name search
limitMax results (default 25, max 100)
cursorPagination cursor

GET /v1/diagrams/:id

Returns metadata (id, type, name, and sourceId when type is instance).

bash
curl "https://api-staging.medflow.care/v1/diagrams/DIAGRAM_ID" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"