# Change an organisation diagram's classification label

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

Sets public, internal or confidential.

`PATCH /orgs/{org}/diagrams/{id}/classification`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Change an organisation diagram's classification label. |
| What does it take? | A JSON body of type [`ClassifyOrganisationDiagramBody`](https://docs.plotwork.dev/api/schemas.md#classifyorganisationdiagrambody). |
| What does it return? | Status 200 with a body of type [`ClassifiedOrganisationDiagram`](https://docs.plotwork.dev/api/schemas.md#classifiedorganisationdiagram). |
| What can go wrong? | `400` the body is not valid; `401` not signed in; `403` the caller may not make this change (orgs.forbidden), or the request came from an origin that may not make changes; `404` no such organisation or diagram, the caller is not a member, or the diagram is in a folder the caller may not use or held for approval and not theirs; `429` too many requests; `502` the label could not be written into the picture; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

Sets public, internal or confidential. The owner and admins change any label either way; a member only raises the label of a diagram they published. A label that does not allow a public link ends the diagram's link.

## Path parameters

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

## Request body

The body has the type [`ClassifyOrganisationDiagramBody`](https://docs.plotwork.dev/api/schemas.md#classifyorganisationdiagrambody).

| Field | Type | Required | Description |
|---|---|---|---|
| `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. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The label now, the one before, and whether the public link ended. | [`ClassifiedOrganisationDiagram`](https://docs.plotwork.dev/api/schemas.md#classifiedorganisationdiagram) |
| 400 | The body is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The caller may not make this change (orgs.forbidden), 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, the caller is not a member, or the diagram is in a folder the caller may not use or held for approval and not theirs. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 502 | The label could not be written into the picture. | [`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 [`ClassifiedOrganisationDiagram`](https://docs.plotwork.dev/api/schemas.md#classifiedorganisationdiagram).

| Field | Type | Required | Description |
|---|---|---|---|
| `diagramId` | `string` | yes |  |
| `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. |
| `previous` | `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. |
| `shareEnded` | `boolean` | yes | True when the new label ended the diagram's public link: Confidential, or anything but public under "Share only diagrams labelled Public". |

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