TwoMinuteOrg Chart
Slide Deck Quality Org Charts in 2 minutes or less

Org Chart 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/orgchart
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 "Team Structure"
rootrequirednodeThe top of the tree (the lead, manager or sponsor) with everyone else nested under it in `children`. Limits: 60 people and 5 levels in total (the root is level 1); extra people are dropped with a warning, deepest levels and last-listed people first.
layoutstring"top-down" (default): the root at the top, reports in rows below. "left-right": the root on the left, reports in columns to the right, which suits deep or very wide trees.
"top-down", "left-right" · default "top-down"
showInitialsbooleanShow an initials circle on each card, in the card's team colour. Default true. There are no photos.
default true
widthintegerChart width in pixels (640–2400, default 1280, which suits a 16:9 slide). PNG output renders at 2x. Height is always computed from the content.
640–2400 · default 1280
palettestring[]Hex colours applied in order to items that have no colour of their own. 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"]

node

FieldTypeDescription
namerequiredstringPerson or team name, e.g. "Dana Lee" or "Two engineers". Shown bold on the card; the initials circle is made from it. Long names shrink, then truncate with an ellipsis.
max 80 chars
rolestringOptional job title or responsibility, e.g. "Engagement lead". Wraps to two lines, then truncates.
max 100 chars
colorstringOptional hex colour for this card's top stripe and initials, and for everyone below it, e.g. "#10b981". Without one, colour is automatic: the root takes the first palette colour, each of the root's direct reports takes the next one, and everyone below inherits their team's colour.
max 40 chars
childrennode[]Direct reports, left to right (top to bottom in left-right layout). More than 4 reports that have no reports of their own are stacked in a column under their manager to keep the chart compact.
max 30 items

Endpoints

  • POST /api/render/orgchart returns image/png; add ?format=svg for SVG.
  • GET /orgchart.png?d=<payload> and /orgchart.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.
  • /orgchart#d=<payload> opens the same chart in the builder for editing.
  • GET /api/render/orgchart?demo=1 returns the demo chart.
  • GET /api/schema/orgchart 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_org_chart tool that returns the image plus image, SVG and edit links. See the MCP page →