Create Chart
Add a new chart to a dashboard board with a SQL query and chart type. Supports line, bar, pie, funnel, and other visualization types.
Overview
Creates a new chart and attaches it to a board. Returns the full chart object on success. Thechart_type field controls which other request body fields are required or validated. Funnel charts are special - their SQL is auto-generated from the steps array, so pass "SELECT 1" as the query placeholder.
Request Fields
Chart Types
table
Renders query results in a paginated table. No axis fields needed.
number
Renders a single scalar value (KPI card). The query must return exactly 1 row × 1 column.
bar, line, and area
All three require x_axis and at least 1 column in y_axis. area requires exactly 1 column in y_axis when group_by is set.
pie
Requires exactly 1 column in y_axis. x_axis identifies the label column.
stacked
Requires x_axis, exactly 1 column in y_axis, and group_by.
Funnel Charts
Funnel charts measure step-by-step user conversion. The SQL is auto-generated fromsteps, so query must be the placeholder "SELECT 1". At least 2 steps are required.
The FunnelStep Object
Each step in the steps array has the following shape:
Filter Operators (StepFilterCondition)
settings for Funnel Charts
ConversionWindow
unit must be one of: hour · day · week (7 days).
breakdown values
device · browser · os · location · referrer · ref · utm_source · utm_medium · utm_campaign · utm_term · utm_content · builder_codes
The top categories are shown individually. The rest collapse into “Others”.
Funnel Examples
Basic 3-step closed funnel
With per-step property filters
Filter step 2 to MetaMask wallets on Ethereum mainnet:With breakdown by device
Open funnel with multi-value in filter
User Paths Charts
Visualize how users navigate your app after a starting event.settings.startStep is required.
settings for User Paths Charts
Retention Charts
Measures how often users return over time. Thequery field is not used - pass "" or omit it.
settings for Retention Charts
RetentionUserFilter:
settings:
Validation Reference
Response
201 Created - returns the full chart object.
id with the Get Chart, Update Chart, and Delete Chart endpoints.
400 Bad Request - validation failed (missing required fields, invalid SQL, wrong step count, etc.). Branch on error.code; see Errors.
Overview
Creates a new chart and attaches it to a board. Returns the full chart object on success. Thechart_type field controls which other request body fields are required or validated. Funnel charts are special - their SQL is auto-generated from the steps array, so pass "SELECT 1" as the query placeholder.
Request Fields
Chart Types
table
Renders query results in a paginated table. No axis fields needed.
number
Renders a single scalar value (KPI card). The query must return exactly 1 row × 1 column.
bar, line, and area
All three require x_axis and at least 1 column in y_axis. area requires exactly 1 column in y_axis when group_by is set.
pie
Requires exactly 1 column in y_axis. x_axis identifies the label column.
stacked
Requires x_axis, exactly 1 column in y_axis, and group_by.
Funnel Charts
Funnel charts measure step-by-step user conversion. The SQL is auto-generated fromsteps, so query must be the placeholder "SELECT 1". At least 2 steps are required.
The FunnelStep Object
Each step in the steps array has the following shape:
Filter Operators (StepFilterCondition)
settings for Funnel Charts
ConversionWindow
unit must be one of: hour · day · week (7 days).
breakdown values
device · browser · os · location · referrer · ref · utm_source · utm_medium · utm_campaign · utm_term · utm_content · builder_codes
The top categories are shown individually. The rest collapse into “Others”.
Funnel Examples
Basic 3-step closed funnel
With per-step property filters
Filter step 2 to MetaMask wallet connections on Ethereum mainnet:With breakdown by device
Open funnel with multi-value in filter
User Paths Charts
Visualize how users navigate your app after a starting event.settings.startStep is required.
settings for User Paths Charts
Retention Charts
Measures how often users return over time. Thequery field is not used - pass "" or omit it.
settings for Retention Charts
RetentionUserFilter:
settings:
Validation Reference
Response
201 Created - returns the full chart object.
id with the Get Chart, Update Chart, and Delete Chart endpoints.
400 Bad Request - validation failed (missing required fields, invalid SQL, wrong step count, etc.). Branch on error.code; see Errors.
Authorizations
Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API Keys.
Path Parameters
Body
Request body for creating a chart.
Project the chart belongs to.
Visualization type. Determines which other fields are required:
table, number, funnel, bar, line, area, pie, stacked, user_paths, retention Display name shown on the chart and board.
1SQL query that powers the chart.
funnel: pass"SELECT 1"; the actual query is auto-generated fromsteps.retention: can be omitted or pass""; data is fetched automatically.- All other types: required; must be a valid SQL string.
1Optional description.
Column name for the X axis. Required for bar, line, and stacked.
Column name(s) used as Y axis metrics.
bar/line: at least 1 element required.pie/stacked: exactly 1 element required.
Column to group / stack series by. Required for stacked.
Ordered list of funnel steps. Required for funnel (minimum 2 steps).
Each element is a FunnelStep; add property filters as extra keys on the step object (e.g. "rdns": { "op": "equals", "value": "io.metamask" }).
2Chart-type-specific configuration. The fields that apply depend on chart_type:
- funnel:
funnelType,conversionWindow,breakdown - user_paths:
startStep,endStep,maxSteps,nodesPerStep,conversionWindow,filters - retention:
retentionFilter,retentionUserFilters,retentionSignalType,retentionLabelSignal
All fields are optional at the schema level; see per-type validation rules for which are functionally required.
Response
Chart created
A saved chart attached to a board.
Visualization type.
table, number, funnel, bar, line, area, pie, stacked, user_paths, retention SQL query powering the chart. For funnel and retention charts this is a system-managed placeholder.
Column used as the X axis.
Column(s) used as Y axis metric(s).
Column used to group/stack series.
Ordered list of funnel steps. Only present when chart_type is funnel.
Type-specific configuration. See ChartSettings for all fields.