Two Minute Toolkit TwoMinuteFishbone
Slide Deck Quality Fishbone Diagrams in 2 minutes or less

Fishbone Diagram HTTP API

POST a small JSON description and get back a deck-ready PNG (or SVG). The endpoint is open and CORS-enabled, so it works from browsers, scripts, CI and anywhere else you can make an HTTP call. The same JSON opens in the builder.

POST https://www.twominutetoolkit.com/api/render/fishbone
Fair use: rate-limited to 20 requests a minute per IP (bursts capped at 5 a second), shared across every Two Minute tool, with a 64 KB body cap. No key or sign-up needed.

Try it

Open in builder

Code samples

Live preview

Click Render to call the API.

Request body

FieldTypeDescription
titlestringHeading shown top-left of the chart at 22px bold. Every chart has one title row; an empty string hides it.
max 140 chars · default "Root cause analysis"
widthintegerChart width in pixels (640–2400, default 1280, which suits a 16:9 slide). PNG output renders at 2x. Height is computed from the content: bones grow as long as their causes need.
640–2400 · default 1280
palettestring[]Hex colours applied in order to the category bones that have no colour of their own (bone, cause lines and name pill). Pass the user's brand colours here when they name them. Default: indigo, sky, emerald, amber, red, gray.
max 12 items · default ["#4f46e5","#0ea5e9","#10b981","#f59e0b","#ef4444","#6b7280"]
problemrequiredstringThe effect being analysed, shown in the head box at the right end of the spine, e.g. "Late medication administration on Ward 4B". Phrase it as a problem, not a cause. Wraps to 5 lines in the box; about 3–10 words reads best.
max 120 chars
presetstringStandard category set whose names are used for categories that have no `name`, by position: "6m" (manufacturing: People, Machine, Method, Material, Measurement, Environment), "8p" (services: Product, Price, Place, Promotion, People, Process, Physical evidence, Productivity), "4s" (service industry: Surroundings, Suppliers, Systems, Skills) or "custom" (unnamed categories show "Category 1", "Category 2"…). Default "6m". A category's own `name` always wins.
"6m", "8p", "4s", "custom" · default "6m"
categoriesrequiredobject[]The category bones (1–8; 4–6 is typical), drawn left to right in pairs: the first above the spine, the second below it, the third above, and so on. More than 8 are dropped with a warning. E.g. [{ "name": "People", "causes": [{ "text": "Agency staff unfamiliar with the ward", "sub": ["No induction checklist"] }] }].
max 8 items

categories[] item

FieldTypeDescription
namestringCategory name shown in the pill at the bone's outer end, e.g. "Methods" or "Equipment". Omit it to use the `preset` name for this position. One or two words; long names shrink to 12px, then wrap to 2 lines.
max 40 chars
causesobject[]The causes on this bone (0–6), listed top to bottom. Each is a horizontal branch with its text above the line. E.g. [{ "text": "Night shift understaffed" }, { "text": "Unclear handover", "sub": ["No SBAR template"] }]. A plain string is accepted as a cause without sub-causes: "Night shift understaffed" means { "text": "Night shift understaffed" }.
max 6 items · default []
colorstringOptional hex colour for this bone, its cause lines and its name pill, e.g. "#0ea5e9". Default: the next palette colour.
max 40 chars

Endpoints

  • POST /api/render/fishbone returns image/png; add ?format=svg for SVG.
  • GET /fishbone.png?d=<payload> and /fishbone.svg?d=<payload> render a chart from a link. The payload is the JSON body, raw-deflated and base64url-encoded. Nothing is stored: links are permanent and cached for a year.
  • /fishbone#d=<payload> opens the same chart in the builder for editing.
  • GET /api/render/fishbone?demo=1 returns the demo chart.
  • GET /api/schema/fishbone returns the JSON Schema, for code generators and AIs.

Errors and adjustments

Input is lenient where the intent is clear: numeric strings become numbers, out-of-range values are clamped, and unknown fields are ignored. Adjustments are listed in the X-Render-Warnings header. Anything unclear returns a 400 that says how to fix it:

{
  "error": "Invalid payload",
  "issues": [{ "path": "tasks", "message": "must be an array" }],
  "example": { … }
}

Calling from an AI assistant?

Use the hosted MCP server instead. It gives Claude, Cursor and other MCP clients a create_fishbone tool that returns the image plus image, SVG and edit links. See the MCP page →