# Combine one of your series into one diagram

> Page: https://docs.plotwork.dev/api/post-user-diagrams-series-series-id-combine. Index of every page: https://docs.plotwork.dev/llms.txt

Merges the flow parts of the account's series into one diagram and publishes it as the series' place 0, in the folder of its first part.

`POST /user/diagrams/series/{seriesId}/combine`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Combine one of your series into one diagram. |
| What does it take? | `seriesId` in the path. |
| What does it return? | Status 201 with a body of type [`CombinedHostedSeries`](https://docs.plotwork.dev/api/schemas.md#combinedhostedseries). |
| What can go wrong? | `400` the series id is not letters, digits, - and _; `401` not signed in; `403` the plan has no room (hosting.quota_exceeded); `404` the account has no such series; `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; `503` hosting is 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 the account's series into one diagram and publishes it as the series' place 0, in the folder of its first part. Each part must carry its source.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `seriesId` | `string` | yes | The series id the parts were published with. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 201 | The combined diagram and what went into it. | [`CombinedHostedSeries`](https://docs.plotwork.dev/api/schemas.md#combinedhostedseries) |
| 400 | The series id is not letters, digits, - and _. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The plan has no room (hosting.quota_exceeded). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | The account has no such series. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 413 | The combined diagram is larger than the plan hosts. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#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`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Hosting is not set up on this server, or the engine is unavailable. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 201 answer has the type [`CombinedHostedSeries`](https://docs.plotwork.dev/api/schemas.md#combinedhostedseries).

| Field | Type | Required | Description |
|---|---|---|---|
| `diagram` | `PublishedDiagram` | yes |  |
| `diagram.id` | `string` | yes | The handle for managing the diagram (delete). It is not in the link. |
| `diagram.url` | `string` | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
| `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.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 plan keeps diagrams until you delete them. |
| `diagram.locked` | `boolean` | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
| `diagram.lockedAt` | `integer \| null` | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
| `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 hosted and its link was kept. |
| `diagram.stableLink` | `StableLink` | no | Present only when the publish named an alias: the stable link, now pointing at this diagram. |
| `diagram.stableLink.id` | `string` | yes | The handle for managing the stable link (delete). It is not in its address. |
| `diagram.stableLink.alias` | `string` | yes | The name you gave it. Only you see it. |
| `diagram.stableLink.url` | `string` | yes | The public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture. |
| `diagram.stableLink.diagramId` | `string \| null` | yes | The diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again. |
| `diagram.stableLink.createdAt` | `integer` | yes | When it was made, in milliseconds since the epoch. |
| `diagram.stableLink.updatedAt` | `integer` | yes | When it was last pointed at a diagram, in milliseconds since the epoch. |
| `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](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
