# Share an organisation diagram at a public link

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

Gives the diagram a stable public address on the CDN host: a copy of its picture, without its source, that follows its edits and never changes.

`PUT /orgs/{org}/diagrams/{id}/share`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Share an organisation diagram at a public link. |
| What does it take? | `org`, `id` in the path. |
| What does it return? | Status 200 with a body of type [`SharedOrganisationDiagram`](https://docs.plotwork.dev/api/schemas.md#sharedorganisationdiagram). |
| What can go wrong? | `401` not signed in; `403` public sharing is off (orgs.sharing_off), the role may not share this diagram (orgs.forbidden), the plan has no room for another link (hosting.quota_exceeded, reason stablelinks), or the request came from an origin that may not make changes; `404` no such organisation or diagram, or the caller is not a member, or the diagram is in a folder the caller may not use; `409` the diagram's label does not allow a public link (orgs.share_classified), or it is waiting for approval (orgs.diagram_pending); `429` too many requests; `502` the public copy could not be written; no link was made; `503` organisations or hosting are not set up on this server. Every failure uses the one error envelope. |

## What it does

Gives the diagram a stable public address on the CDN host: a copy of its picture, without its source, that follows its edits and never changes. Only while the owner allows public sharing. The owner and admins share any diagram, a member only one they published.

## 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 diagram was already shared; its link is kept and its copy written again. | [`SharedOrganisationDiagram`](https://docs.plotwork.dev/api/schemas.md#sharedorganisationdiagram) |
| 201 | The link was made. | [`SharedOrganisationDiagram`](https://docs.plotwork.dev/api/schemas.md#sharedorganisationdiagram) |
| 202 | "Public sharing needs approval" held the link: no link yet, and the request it waits on. | [`HeldOrganisationShare`](https://docs.plotwork.dev/api/schemas.md#heldorganisationshare) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | Public sharing is off (orgs.sharing_off), the role may not share this diagram (orgs.forbidden), the plan has no room for another link (hosting.quota_exceeded, reason stableLinks), or the request came from an origin that may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation or diagram, or the caller is not a member, or the diagram is in a folder the caller may not use. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 409 | The diagram's label does not allow a public link (orgs.share_classified), or it is waiting for approval (orgs.diagram_pending). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 502 | The public copy could not be written; no link was made. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations or hosting are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

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

| Field | Type | Required | Description |
|---|---|---|---|
| `diagramId` | `string` | yes |  |
| `url` | `string` | yes | The public address. Paste it as an image, or give it to `GET /oembed`. |
| `sharedAt` | `integer` | yes | When the diagram was first shared, in milliseconds since the epoch. |
| `updatedAt` | `integer` | yes | When the public copy was last written, in milliseconds since the epoch. |
| `sharedBy` | `string \| null` | yes | The account that first shared it, or null once that account is deleted. |
| `created` | `boolean` | yes | True when this call made the link; false when the diagram was already shared and kept its address. |

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