Read, update, delete and filter clinical document sections and templates on the Corti API — with resolved-vs-raw reads, soft-delete semantics, inheritance-aware deletion guards, and label-driven discovery across language, region and specialty
BetaBeyond create and version, sections and templates share a uniform management + discovery surface: read resolved or raw, update metadata, soft-delete with inheritance guards, and filter LIST results by language, region, specialty and label.The endpoints below detail the per-resource specifics. The semantics — resolved-vs-raw reads, soft-delete conflicts, deletion visibility, and filter query params — are shared across both resource types.
Resolved.GET /documents/sections/{sectionID} and GET /documents/templates/{templateID} return the resource resolved — all inheritance applied, sections fully expanded on templates. This is the ready-to-consume shape that will be used at generation time.
Raw.GET .../versions/{versionID} and LIST .../versions return the version raw — only the values this version explicitly owns, plus inheritFromId and (for templates) sectionId references. Use this when you need to distinguish inherited fields from fields the resource explicitly overrides.
DELETE on a section or template returns 409 Conflict if any other section or template inherits from it. Resolve the dependency first — delete or re-parent the inheriting resources — before retrying the delete.Deletion visibility. After deletion, LIST no longer returns the resource, but GET on the resource ID and its version reads continue to work — useful for audit, debugging, and resolving resources still referenced by historical documents or inheritance chains.
PATCH /documents/sections/{sectionID} only updates section-level metadata. To change the prompts or output schema, create a new version and publish it — see Versioning.
PATCH /documents/templates/{templateID} only updates template-level metadata. To change the prompt or section composition, create a new version and publish it — see Versioning.
Both GET /documents/sections and GET /documents/templates accept the same set of query parameters. Use any combination — they’re additive.
Query param
Behavior
lang
BCP-47 language subtag (e.g. fr, de). Repeatable (e.g. ?lang=en&lang=da). Matches resources whose languages[] contains any of the supplied values.
region
ISO 3166-1 alpha-3 country code (e.g. BEL, USA). Repeatable. Matches resources whose regions[] contains any of the supplied values.
specialty
Clinical specialty (e.g. dermatology, cardiology). Repeatable. Matches resources whose specialties[] contains any of the supplied values.
label
Label filter in key:value format (e.g. ?label=customer:acme). Repeatable; matches resources that carry any of the given Label entries.
published
Omit for both, true for published-only, false for unpublished-only.
Empty languages, regions, or specialties means “no tweaks for that dimension” — the resource is generic along that axis. The fields are arrays but each one is optional and empty by default.