# Turn the legend of your diagrams on or off

> Page: https://docs.plotwork.dev/api/put-user-legend. Index of every page: https://docs.plotwork.dev/llms.txt

on or off, for the flow diagrams you draw on the hosted service when no organisation decides it.

`PUT /user/legend`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Turn the legend of your diagrams on or off. |
| What does it take? | A JSON body of type [`SetUserLegendBody`](https://docs.plotwork.dev/api/schemas.md#setuserlegendbody). |
| What does it return? | Status 200 with a body of type [`UserLegend`](https://docs.plotwork.dev/api/schemas.md#userlegend). |
| What can go wrong? | `400` the body is not valid; `401` not signed in; `403` the request came from an origin that may not make changes; `429` too many requests. Every failure uses the one error envelope. |

## What it does

on or off, for the flow diagrams you draw on the hosted service when no organisation decides it.

## Request body

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

| Field | Type | Required | Description |
|---|---|---|---|
| `legend` | `"on" \| "off"` | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The choice now. | [`UserLegend`](https://docs.plotwork.dev/api/schemas.md#userlegend) |
| 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 request came from an origin that may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

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

| Field | Type | Required | Description |
|---|---|---|---|
| `legend` | `"on" \| "off"` | yes | The legend of flow diagrams you draw on the hosted service, on (the default) or off, when no organisation decides it. A repository's plotwork.config.json and a diagram's header still win. |

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