Organisations
Combine a series into one diagram
Merges the flow parts of a series into one diagram, each part a group and the arrows between parts whole again, and publishes it as the series' place 0 in the folder of its first part.
POST
/orgs/{org}/diagrams/series/{seriesId}/combineTL;DR
| Question | Answer |
|---|---|
| What does it do? | Combine a series into one diagram. |
| What does it take? | org, seriesId in the path. |
| What does it return? | Status 201 with a body of type CombinedOrganisationSeries. |
| What can go wrong? | 400 the series id is not letters, digits, - and _; 401 not signed in, or the key is not valid; 403 a reader may not publish (orgs.forbidden), a folder rule forbids it (orgs.folder_restricted, details.reason kept_inside or leaves_rule), or the plan has no room (hosting.quota_exceeded); 404 no such organisation or series, the caller is not a member, or the key belongs to another organisation; 413 the combined diagram is larger than the plan hosts; 422 a part carries no source or is not a flow (diagram.series_not_combinable, details.parts), or the combined diagram has errors; 429 too many requests, or the daily limit is used up; 503 organisations are not set up on this server, or the engine is unavailable. Every failure uses the one error envelope. |
What it does
Merges the flow parts of a series into one diagram, each part a group and the arrows between parts whole again, and publishes it as the series' place 0 in the folder of its first part. Each part must carry its source. The rights, folder rules, plan, and approval of a publish apply.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
seriesId | string | yes | The series id the parts were published with. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | The combined diagram and what went into it. | CombinedOrganisationSeries |
| 400 | The series id is not letters, digits, - and _. | ErrorResponse |
| 401 | Not signed in, or the key is not valid. | ErrorResponse |
| 403 | A reader may not publish (orgs.forbidden), a folder rule forbids it (orgs.folder_restricted, details.reason kept_inside or leaves_rule), or the plan has no room (hosting.quota_exceeded). | ErrorResponse |
| 404 | No such organisation or series, the caller is not a member, or the key belongs to another organisation. | ErrorResponse |
| 413 | The combined diagram is larger than the plan hosts. | ErrorResponse |
| 422 | A part carries no source or is not a flow (diagram.series_not_combinable, details.parts), or the combined diagram has errors. | ErrorResponse |
| 429 | Too many requests, or the daily limit is used up. | ErrorResponse |
| 503 | Organisations are not set up on this server, or the engine is unavailable. | ErrorResponse |
Response body
A 201 answer has the type CombinedOrganisationSeries.
| Field | Type | Required | Description |
|---|---|---|---|
diagram | PublishedOrganisationDiagram | yes | |
diagram.id | string | yes | The handle for the diagram in the routes below. |
diagram.name | string | null | yes | The label given at publish, or null. |
diagram.folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
diagram.scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
diagram.bytes | integer | yes | Size of the stored SVG in bytes. |
diagram.createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
diagram.publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
diagram.publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
diagram.publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
diagram.publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
diagram.publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
diagram.createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
diagram.publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
diagram.expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
diagram.viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
diagram.locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
diagram.lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
diagram.restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
diagram.keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
diagram.share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
diagram.share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
diagram.share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
diagram.kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
diagram.deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
diagram.classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
diagram.pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
diagram.changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
diagram.series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
diagram.series.id | string | yes | The series id the parts were published with. |
diagram.series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
diagram.series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
diagram.created | boolean | yes | True when this call stored a new diagram; false when the same diagram was already in the library and was kept. |
diagram.sourceEmbedded | boolean | yes | True when the stored picture carries the diagram source: the call sent embedSource true, or left it out while the organisation's keepEditable is on. |
diagram.approval | ApprovalHold | no | Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves. |
diagram.approval.state | "pending" | yes | |
diagram.approval.requestId | string | yes | The request, as the Approvals queue lists it. |
diagram.approval.kind | "publish" | "change" | "share" | yes | publish (a new diagram), change (a new version of one the library shows) or share (a public link). |
diagram.approval.expiresAt | integer | yes | When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made. |
diagram.approval.message | string | yes | One sentence to tell the person: held for approval by the organisation, and what happens next. |
diagram.approval.code | string | yes | The warning code a tool answer carries for it: W601. |
merged | integer[] | yes | The places of the parts merged, in order. |
skipped | object[] | yes | The parts left out on purpose. |
skipped[].index | integer | yes | |
skipped[].name | string | yes | |
skipped[].reason | "overview" | "combined" | yes | overview: a split's overview, whose boxes stand for parts. combined: an earlier combined whole, which this one takes the place of. |
links | object | yes | The arrows between parts. |
links.restored | integer | yes | Arrows a part drew to a dashed box of another part, now ending on the box itself. |
links.kept | integer | yes | Arrows that still end on a dashed box naming another part, because that part is not in the series. |
note | string | yes | One sentence for the person: what was merged and how the arrows between parts were drawn. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |