# List an organisation's diagrams

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

The organisation's diagrams, most recently published first and at most 200, with where the organisation stands against its owner's plan.

`GET /orgs/{org}/diagrams`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | List an organisation's diagrams. |
| What does it take? | `org` in the path. |
| What does it return? | Status 200 with a body of type [`OrganisationDiagramList`](https://docs.plotwork.dev/api/schemas.md#organisationdiagramlist). |
| What can go wrong? | `401` not signed in, or the key is not valid; `404` no such organisation, the caller is not a member of it, or the key belongs to another organisation; `429` too many requests, or the daily limit is used up; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

The organisation's diagrams, most recently published first and at most 200, with where the organisation stands against its owner's plan. A signed-in member, an organisation's key, or a member's own key may call it.

## Path parameters

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

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The diagrams and the usage. | [`OrganisationDiagramList`](https://docs.plotwork.dev/api/schemas.md#organisationdiagramlist) |
| 401 | Not signed in, or the key is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, the caller is not a member of it, or the key belongs to another organisation. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests, or the daily limit is used up. | [`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 [`OrganisationDiagramList`](https://docs.plotwork.dev/api/schemas.md#organisationdiagramlist).

| Field | Type | Required | Description |
|---|---|---|---|
| `items` | `OrganisationDiagram[]` | yes | At most 200, newest published first. |
| `items[].id` | `string` | yes | The handle for the diagram in the routes below. |
| `items[].name` | `string \| null` | yes | The label given at publish, or null. |
| `items[].folder` | `string \| null` | yes | The folder it is filed in, such as `Payments/Checkout`, or null for the top level. |
| `items[].theme` | `"light" \| "dark" \| "auto"` | yes | The color scheme it was drawn in: light, dark, or auto. |
| `items[].bytes` | `integer` | yes | Size of the stored SVG in bytes. |
| `items[].createdBy` | `string \| null` | yes | The account that published it, or null when that account has left or an organisation key published it. |
| `items[].createdAt` | `integer` | yes | When it was first published, in milliseconds since the epoch. |
| `items[].publishedAt` | `integer` | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
| `items[].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. |
| `items[].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. |
| `items[].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. |
| `items[].lockedAt` | `integer \| null` | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
| `items[].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. |
| `usage` | `OrganisationHostingUsage` | yes |  |
| `usage.plan` | `"free" \| "pro" \| "enterprise"` | yes |  |
| `usage.count` | `integer` | yes | Diagrams the organisation holds. This is the total, even when the list is shorter. minimum 0. |
| `usage.bytes` | `integer` | yes | minimum 0. |
| `usage.limits` | `OrganisationLimits` | yes |  |
| `usage.limits.dailyCalls` | `integer` | yes |  |
| `usage.limits.hostedDiagrams` | `integer` | yes | Diagrams the organisation may hold. |
| `usage.limits.hostedBytes` | `integer` | yes | Total bytes of diagrams the organisation may hold. |
| `usage.limits.retentionDays` | `integer \| null` | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
| `usage.limits.maxDiagramBytes` | `integer` | yes |  |
| `usage.limits.stableLinks` | `integer` | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
| `usage.limits.organisations` | `integer` | yes | Organisations an account on this plan may own. |
| `usage.limits.orgMembers` | `integer` | yes | People one organisation may have, the owner included and pending invitations counted. |
| `usage.limits.orgIcons` | `integer` | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
| `usage.limits.driftHistoryDays` | `integer` | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
| `usage.limits.auditRetentionDays` | `integer` | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |

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