# Preview a custom icon in a diagram

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

Draws one icon on a box of a small fixed diagram, in light and dark, in the organisation's brand while it is active.

`GET /orgs/{org}/icons/{name}/preview`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Preview a custom icon in a diagram. |
| What does it take? | `org`, `name` in the path. |
| What does it return? | Status 200 with a body of type [`IconPreview`](https://docs.plotwork.dev/api/schemas.md#iconpreview). |
| What can go wrong? | `401` not signed in; `404` no such organisation, the caller is not a member of it, or no such icon; `429` too many requests; `503` organisations are not set up on this server, or the drawing engine is not available (engine.unavailable). Every failure uses the one error envelope. |

## What it does

Draws one icon on a box of a small fixed diagram, in light and dark, in the organisation's brand while it is active. Every member may. Stores nothing.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |
| `name` | `string` | yes | The name after org:, lowercase words joined by hyphens. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The source and the pictures. | [`IconPreview`](https://docs.plotwork.dev/api/schemas.md#iconpreview) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, the caller is not a member of it, or no such icon. | [`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, or the drawing engine is not available (engine.unavailable). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

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

| Field | Type | Required | Description |
|---|---|---|---|
| `ref` | `string` | yes | What a diagram writes to use the icon. |
| `source` | `string` | yes | The diagram source the preview draws, which uses the icon on one box. |
| `light` | `string` | yes | The preview drawn on light, as SVG text. |
| `dark` | `string` | yes | The preview drawn on dark, as SVG text. |

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