Sign Customiser

Navigation

Dark mode

Shows what the icon converter makes of a drawing before you create an icon from it. The server sanitises the SVG, converts it through the icon service, and sanitises the result again, which is the same pass an icon create or an svg update runs.

POST/api/v3/customisers/{customiser_id}/icons/preview
POSTPreview an icon
POST/api/v3/customisers/{customiser_id}/icons/preview

Preview an icon

Shows what the icon converter makes of a drawing before you create an icon from it. The server sanitises the SVG, converts it through the icon service, and sanitises the result again, which is the same pass an icon create or an svg update runs. The answer's `svg` is the drawing the create would store as `rendered_svg`. Nothing is saved: no icon is created, the icon font is not rebuilt, and no idempotency key is used, so the operation is safe to repeat. Requires `customisers:read`. Each call uses the icon service, so the operation has its own per-key limit, separate from the option-write budget. When you exceed it, the answer is a 429 with `retry_after`; wait that many seconds and retry. A drawing that is not a single SVG, or that has nothing left once scripts, event handlers and external references are removed, is a 422 with the error code `invalid_svg` on `/svg`; send a plain vector drawing. A 502 `icon_conversion_failed` means the icon service could not be reached; retry the request.

Authorisation

The Authorization header expects a Bearer token. Generate one on the API keys page in your dashboard.

Path

The customiser id, from the list customisers operation.

Body
Preview an icon

Overview

The answer's svg is the drawing the create would store as rendered_svg. Nothing is saved: no icon is created, the icon font is not rebuilt, and no idempotency key is used, so the operation is safe to repeat. Requires customisers:read. Each call uses the icon service, so the operation has its own per-key limit, separate from the option-write budget. When you exceed it, the answer is a 429 with retry_after; wait that many seconds and retry. A drawing that is not a single SVG, or that has nothing left once scripts, event handlers and external references are removed, is a 422 with the error code invalid_svg on /svg; send a plain vector drawing. A 502 icon_conversion_failed means the icon service could not be reached; retry the request.

Authorisation

Bearer token required. Include it in the Authorization header.

Required scope: customisers:read

Path parameters

customiser_idstringpathrequired

The customiser id, from the list customisers operation.

Example: 1

Request body

svgstringbody

Request body example

application/json
{
  "svg": "<svg viewBox=\"0 0 24 24\"><path d=\"M4 4h16v16H4z\"/></svg>"
}
Preview an icon
curl https://web.signcustomiser.com/api/v3/customisers/1/icons/preview \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "svg": "<svg viewBox=\"0 0 24 24\"><path d=\"M4 4h16v16H4z\"/></svg>"
}'
Response
{
  "data": {
    "object": "icon_preview",
    "customiser_id": 42,
    "svg": "<svg viewBox=\"0 0 24 24\"><path d=\"M4 4h16v16H4z\"/></svg>"
  },
  "links": {
    "self": "https://web.signcustomiser.com/api/v3/customisers/42/icons/preview",
    "documentation": "https://www.signcustomiser.com/help/api/"
  },
  "meta": {
    "api_version": "v3",
    "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
  }
}

Type a question and press Enter. Use the arrow keys to move between the results.