Skip to main content
PUT
Edit chart

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API.

Headers

Idempotency-Key
string

Optional unique value (e.g. a UUID v4) that lets you safely retry POST/PUT/PATCH/DELETE requests. The first request runs normally; subsequent requests with the same key replay the stored response (status + body) for 24 hours, so retries can never double-create or double-charge. Two concurrent requests with the same key return 409 IDEMPOTENCY_IN_PROGRESS. Generate a fresh key per logical operation.

Maximum string length: 255

Path Parameters

boardId
string
required
chartId
string
required

Body

application/json

Request body for updating an existing chart. The title, description and spec replace the stored ones; the spec is validated as on create.

chartId
string
required

ID of the chart to update.

projectId
string
required

Project the chart belongs to.

title
string
required

Display name shown on the chart and board.

Minimum string length: 1
spec
object
required

Chart spec v1: query says what the chart computes, view how it is drawn (a Vega-Lite subset; channels name result columns and never compute). SQL charts: number = {mark:"text", encoding:{}} (1 row, 1 column), or encoding.text {field?, format?} to pick and format a column of the one row; table = {mark:"x-table"}; bar/line/area/point need encoding.x and encoding.y. Several y columns: transform [{fold:[cols], as:["series","value"]}] with y = value and color = series (bar also xOffset = series; area also y.stack true). One y column split by a column: line + color = one line per value; bar + color + xOffset (same column) = grouped bars; bar or area + color + y.stack true = stacked, y.stack "normalize" = 100% stacked (shares). Horizontal bars: bar with y {field, type:"nominal"} (the category) and x {field, type:"quantitative"} (the value), grouped with yOffset. Number format: axis {format} on the value channel (d3-format: "$,.2f" money, ".1%" fractions as percent, ".3~s" compact). Scatter = {mark:"point"} with numeric x and y, optional color. Pie = {mark:"arc", encoding:{theta:{field, aggregate:"sum"}, color:{field}}}. Layered view {layer:[...], resolve?}: a chart plus goal lines {mark:"rule", encoding:{y:{datum:}}}, or combo = one bar layer + one line layer on the same x with one y each, resolve.scale.y "independent" for a second axis; a goal on that right (line) axis nests the line and its rule: {layer:[, {layer:[, ]}], resolve:{scale:{y:"independent"}}} (a top-level rule is on the left axis). Only these combinations are valid: a view must draw exactly as written. Funnel, retention and paths queries are drawn with x-funnel, x-retention and x-sankey.

description
string

Optional description.

Response

Chart updated

Chart ID