create_publication
mutationSince v1.0Create a publication — the thing that turns your model into a readable site or a PDF report. A publication decides three things: which navigation trees form the site map, which rendering presents each type of element, and what the homepage says.
Use list_trees and list_renderings first to find the ids you need. The homepage is written the same way a rendering document is, except that it isn't about any one element.
Applied immediately. Publishing it — fixing it to a particular version of the model for readers — is a separate step; see publish_publication.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
show_auto_ids | Boolean | — | true | Whether readers see elements' auto-IDs — 'PRC-9: Payment Capture' — everywhere they read: the navigation tree, section indexes, page titles, and what the reading assistant may quote. On by default for a new publication. |
slug | String | ✓ | The publication's path segment in its URL. Keep it short and URL-safe — 'service-handbook'. | |
description | String | — | Optional note for whoever maintains the publication. Not shown to readers. | |
homepage | String | — | The publication's front page, written the same way a rendering document is except that it isn't about any one element. Blocks that reach out across the whole model work here; ones relative to a subject have nothing to start from. | |
nav | Array<Object> | — | Which navigation trees form the site map, and so which pages the publication has at all. Use list_trees to find tree ids. | |
rendering_selection | Array<Object> | — | Which rendering presents each type of element. A type with several renderings — a full page and a short summary, say — is decided here, per publication. Use list_renderings to find rendering ids. | |
name | String | ✓ | The publication's display name. | |
external_services | Array<Object> | — | Report services connected to this publication. | |
folder_id | String | — | Folder to place the new publication in, by ID or name. |
Example Request
{"name": "Service Handbook", "slug": "service-handbook", "homepage": "# Service Handbook\n\nEverything we run, and who owns it.", "nav": [{"tree_id": "c017..."}], "rendering_selection": [{"target_type_id": "nt-uuid", "rendering_id": "4e2a..."}]}Example Response
{"success": true, "operation_count": 1, "versions": [95], "created": [{"kind": "publication", "id": "pb-1", "label": "Service Handbook"}]}This content was written collaboratively with AI.