Skip to content
Connect an agent
Organisations

Preview a custom icon in a diagram

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

QuestionAnswer
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.
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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.
namestringyesThe name after org:, lowercase words joined by hyphens.

Responses

StatusMeaningBody
200The source and the pictures.IconPreview
401Not signed in.ErrorResponse
404No such organisation, the caller is not a member of it, or no such icon.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server, or the drawing engine is not available (engine.unavailable).ErrorResponse

Response body

A 200 answer has the type IconPreview.

FieldTypeRequiredDescription
refstringyesWhat a diagram writes to use the icon.
sourcestringyesThe diagram source the preview draws, which uses the icon on one box.
lightstringyesThe preview drawn on light, as SVG text.
darkstringyesThe preview drawn on dark, as SVG text.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools