# List an organisation diagram's previous versions

> Page: https://docs.plotwork.dev/api/get-orgs-org-diagrams-id-versions. Index of every page: https://docs.plotwork.dev/llms.txt

The pictures the diagram had before it was edited or restored in the portal, newest first, at most ten.

`GET /orgs/{org}/diagrams/{id}/versions`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | List an organisation diagram's previous versions. |
| What does it take? | `org`, `id` in the path. |
| What does it return? | Status 200 with a body of type [`DiagramVersionList`](https://docs.plotwork.dev/api/schemas.md#diagramversionlist). |
| What can go wrong? | `401` not signed in; `404` no such organisation or diagram, the diagram is in a folder the caller may not use, or the caller is not a member; `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

The pictures the diagram had before it was edited or restored in the portal, newest first, at most ten. Every role that can see the diagram may look.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |
| `id` | `string` | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The versions. | [`DiagramVersionList`](https://docs.plotwork.dev/api/schemas.md#diagramversionlist) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation or diagram, the diagram is in a folder the caller may not use, or the caller is not a member. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`DiagramVersionList`](https://docs.plotwork.dev/api/schemas.md#diagramversionlist).

| Field | Type | Required | Description |
|---|---|---|---|
| `items` | `DiagramVersion[]` | yes | Newest first. A diagram keeps at most ten. |
| `items[].id` | `string` | yes | The handle for restoring it. |
| `items[].savedAt` | `integer` | yes | When it stopped being the current picture, in milliseconds since the epoch. |
| `items[].bytes` | `integer` | yes | Size of the stored SVG in bytes. Versions do not count toward the plan. |
| `items[].theme` | `"light" \| "dark" \| "auto"` | yes |  |

## 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 |
