Docs menu · Developers

API reference

Push rows from n8n, Make, Zapier or a script, and read your charts back. Base URL: https://chartomodo.com/api/v1

Updated 15 October 2026

Authentication

Create a token in Settings → API and choose a preset. Full: every scope, no expiry; Agent: every scope, expires after 90 days; Read only: datasets:read and charts:read, expires after 90 days. Reading (datasets:read, charts:read and GET /api/v1/me) needs the Starter plan or higher; writing (datasets:write, charts:write, dashboards:write) needs the Pro plan or higher. Send the token on every request as a Bearer token; the scheme name is not case-sensitive. The token is shown once. Revoke it in the same place at any time.

Each endpoint names the scope it needs. A request outside the token's scopes answers 403 scope_required with the scope in the message. A token past its expiry answers 401 token_expired: create a new one, there is no renewal. datasets:read and datasets:write cover datasets and rows, charts:read the chart reads, charts:write creating and changing charts (and reading their schema), dashboards:write creating dashboards.

GET /api/v1/me returns your id, email and plan. Use it to check that a token works. It needs no scope, only a token that is neither revoked nor expired.

curl https://chartomodo.com/api/v1/me -H "Authorization: Bearer cmo_…"
chartomodo.com/settings/api
The Settings API page, where a token is created with a preset and listed with its scopes and expiry.
Settings → API: create a token, pick a preset, copy it once.

Create a dataset

POST /api/v1/datasets with a name (1-100 characters) and the first rows. It answers 201 with the dataset id, rowCount, columns, addedColumns and droppedColumns. Open the dataset from Home to build a chart on it. A dataset counts toward your plan's source limit, like a CSV upload.

GET /api/v1/datasets lists your datasets as {"data":[…]}, newest first, each with id, name, columns, rowCount, lastIngestAt and createdAt. DELETE /api/v1/datasets/{id} answers 204. Charts built on it stay, with no data source.

curl -X POST https://chartomodo.com/api/v1/datasets -H "Authorization: Bearer cmo_…" -H "Content-Type: application/json" \
  -d '{"name":"Daily sales","rows":[{"day":"2026-10-01","amount":120.5}]}'

Replace or append rows

PUT /api/v1/datasets/{id}/rows replaces every row in one step: embeds show the old rows or the new ones, never half. Columns the new rows no longer have are listed in droppedColumns.

POST /api/v1/datasets/{id}/rows appends. A column that is new gets null in the rows already stored. Both answer 200 with id, rowCount, columns, addedColumns and droppedColumns.

The body is {"rows":[…]}: a non-empty array of flat objects. A cell is a string, a finite number, true, false or null. Send dates as ISO strings (2026-10-01). A nested object or array is refused with nested_value. A key missing from a row becomes null. Column names are trimmed, must not repeat within a row, and are at most 200 characters. A string cell holds at most 10,000 characters.

curl -X PUT https://chartomodo.com/api/v1/datasets/{id}/rows -H "Authorization: Bearer cmo_…" -H "Content-Type: application/json" \
  -d '{"rows":[{"day":"2026-10-02","amount":98}]}'

Retrying an append safely

Send an Idempotency-Key header on PUT or POST /api/v1/datasets/{id}/rows: 1-255 printable ASCII characters, no spaces. POST /api/v1/charts and POST /api/v1/dashboards take it too and answer the id of what the first call made. Other endpoints ignore it. Keys are scoped to the token and the dataset (or, on those two POSTs, the endpoint). Once a write with a key has succeeded, the same key on the same dataset within 24 hours writes nothing and answers 200 {"duplicate":true}. A write that fails frees its key, so the retry goes through. An empty header is ignored. An invalid key is a 400 invalid_idempotency_key, and a body that is not valid JSON (400 invalid_json) never uses up a key.

While the first request with a key is still running, a retry gets 503 idempotency_in_progress with Retry-After: 5. Wait and send it again: if the first write succeeded you get the duplicate answer, if it failed the retry writes the rows.

If the key cannot be checked, the write is refused with 503 idempotency_unavailable rather than risk adding rows twice. Retry later.

curl -X POST https://chartomodo.com/api/v1/datasets/{id}/rows -H "Authorization: Bearer cmo_…" -H "Content-Type: application/json" \
  -H "Idempotency-Key: sales-2026-10-02" \
  -d '{"rows":[{"day":"2026-10-02","amount":98}]}'

Read charts

GET /api/v1/charts lists your newest 500 charts as {"data":[…]}. Each has id, title, type, datasetId (set when the chart reads an API dataset, otherwise null), sourceType (notion, csv, api or a connector kind such as postgres or stripe; null when the CSV, API or connector dataset the chart read was deleted), embedUrl and updatedAt. embedUrl is null for a private chart that has no embed token yet. GET /api/v1/charts/{id} returns one chart. An unknown id, or a chart that belongs to someone else, answers 404 not_found.

GET /api/v1/charts/{id}/data returns the numbers the chart draws: id, title, type, categories, series (one array per series), percent, degraded and truncated. If the chart's source cannot be read, it answers 502 source_unavailable.

curl https://chartomodo.com/api/v1/charts/{id}/data -H "Authorization: Bearer cmo_…"

Create charts

POST /api/v1/charts creates a chart on a dataset made through this API. Body: name (1-100 characters), type, datasetId, config_axis, and optionally engine, isPublic and config_ui. config_axis and config_ui are the builder's own shapes: GET /api/v1/charts/schema returns both as JSON Schema, plus types, engines (which types each engine draws) and allowed (the engines and types your plan may use). A chart is public unless you send isPublic: false, which needs a plan that includes private charts. It answers 201 with the same Chart object GET /api/v1/charts/{id} returns, embedUrl included. The API makes no thumbnail: the chart list draws the chart itself until it is saved once in the builder, which stores one.

POST /api/v1/charts/validate takes the same body and answers 200 {"ok":true,"chart":{…}} with the chart as it would be stored, or the same errors POST gives, without writing anything and without counting against the chart limit. Validate first, then create.

PATCH /api/v1/charts/{id} changes name, type, engine, isPublic, config_axis or config_ui. Every field is optional and the result is checked as a whole chart; a block you send replaces the stored block whole, so send the full config_axis, not one key of it. datasetId cannot change (422 invalid_chart): create another chart. It answers 200 with the Chart, or 404 not_found. PATCH re-checks the whole chart against the current plan: a chart that uses a feature no longer in the plan must drop it in the same PATCH (for example isPublic:true), else 403 plan_required with feature. A field sent as null, or an unknown field such as title, is 422 invalid_chart: leave it out to keep it.

A body that fails validation answers 422 invalid_chart with issues: a list of {"path","message"}, where path is the field (config_axis.aggregation, type, engine). A datasetId that is not one of your API datasets answers 422 invalid_dataset. A chart option your plan lacks answers 403 plan_required with feature in the error. Past the plan's chart limit the answer is 422 chart_limit. POST /api/v1/charts takes an Idempotency-Key like the row writes; a repeat answers 200 {"duplicate":true,"id":"…"} with the id of the chart the first call made.

curl -X POST https://chartomodo.com/api/v1/charts -H "Authorization: Bearer cmo_…" -H "Content-Type: application/json" \
  -H "Idempotency-Key: sales-by-day-1" \
  -d '{"name":"Sales by day","type":"bar","datasetId":"{datasetId}","config_axis":{"xAxisProp":"day","yAxisProps":["amount"],"aggregation":"sum","filters":[]}}'

Dashboards

POST /api/v1/dashboards groups charts into a dashboard. Body: chartIds (1-50 ids of your charts, in display order), optionally name (up to 100 characters) and layout. Without layout the charts are laid out two per row. With layout, send one block per chart: {"x","y","w","h","chartId"} on a 12 column grid, x+w at most 12, every chartId one of chartIds. It answers 201 with id, name, embedUrl and chartIds. Idempotency-Key works as on POST /api/v1/charts.

embedUrl is null when your plan cannot share dashboards: the dashboard exists, private, and you can open it in the app. A chart id that is not yours answers 404 not_found naming it. A body that fails validation answers 422 invalid_dashboard. Past the plan's dashboard limit the answer is 422 dashboard_limit. There is no PATCH or DELETE for dashboards over the API yet; use the app.

curl -X POST https://chartomodo.com/api/v1/dashboards -H "Authorization: Bearer cmo_…" -H "Content-Type: application/json" \
  -d '{"name":"Sales","chartIds":["{chartId}"]}'

Insights and CSV

GET /api/v1/charts/{id}/insights returns the sentences the embed would print under the chart, whether or not the chart shows them: {"id","text":[...],"facts":{...}}. text holds up to 4 sentences computed from the numbers the chart draws by fixed rules, no model involved; it is empty for a chart type without insights (bar, line, area, pie, donut have them), when the source is degraded or truncated, when the stored axis config fails the schema, and when fewer than two categories carry a value. facts carries the categories, series, percent, truncated and degraded the sentences were read from, so an agent can quote both.

GET /api/v1/charts/{id}/data?format=csv returns the same numbers as CSV (RFC 4180, CRLF line endings, Content-Type text/csv): a category column, then one column per series, one row per category. The CSV carries no degraded or truncated flag; read the JSON shape for those. format=json or no format is the JSON shape above; any other value answers 400 invalid_format.

curl https://chartomodo.com/api/v1/charts/{id}/insights -H "Authorization: Bearer cmo_…"
curl "https://chartomodo.com/api/v1/charts/{id}/data?format=csv" -H "Authorization: Bearer cmo_…"

Limits

5 MB per request body, 50,000 rows and 100 columns per dataset, 10 MB stored per dataset, 60 requests per minute per token.

Past the rate limit the answer is 429 with a Retry-After header in seconds. Wait that long, then retry. If a write answers 503 busy, another write holds the dataset: retry in a few seconds.

Errors

Every error is JSON: {"error":{"code":"…","message":"…"}}. Branch on the code, not the message.

StatusCodeMeaning
400invalid_jsonThe body is missing or is not valid JSON.
400invalid_idempotency_keyIdempotency-Key is not 1-255 printable ASCII characters without spaces.
400invalid_formatformat must be json or csv.
401invalid_tokenThe token is missing, malformed, unknown or revoked.
401token_expiredThe token passed its expiry date. Create a new one in Settings, API.
403plan_requiredYour plan does not include this. Reading needs the Starter plan or higher, writing the Pro plan or higher. A chart option can also be refused; feature names it, for example private-charts or renderer.
403scope_requiredThe token does not have the scope this endpoint needs. The message names the scope.
403account_suspendedThe account is suspended.
403org_lockedThe token's organization is locked for you, or your membership ended. Ask the organization owner.
403connection_limitCreating the dataset would pass your plan's source limit.
404not_foundThe dataset or chart does not exist or is not yours. On POST /dashboards the message names the first chart id that is not yours.
413payload_too_largeThe body is larger than 5 MB.
422invalid_namename must be 1-100 characters.
422invalid_rowsrows is empty, not an array, holds something that is not an object, or has no columns.
422invalid_columnA column name is empty, reserved, longer than 200 characters, or repeats after trimming.
422nested_valueA cell is an object or an array. Flatten it first.
422invalid_valueA cell is not a string, a finite number, true, false or null.
422cell_too_longA string cell is longer than 10,000 characters.
422row_limitThe dataset would hold more than 50,000 rows. Replace instead of appending.
422column_limitThe dataset would hold more than 100 columns.
422dataset_too_largeThe dataset would be stored at more than 10 MB. Send fewer rows or columns.
422invalid_chartThe chart body failed validation. issues lists each field (path) and its message.
422invalid_datasetdatasetId is not a dataset created through this API, or is not yours.
422invalid_dashboardThe dashboard body failed validation: chartIds must hold 1-50 ids and every layout block must point to one of them.
422chart_limitCreating the chart would pass your plan's chart limit. The message carries the limit.
422dashboard_limitCreating the dashboard would pass your plan's dashboard limit. The message carries the limit.
429rate_limitedMore than the per-token limit. Wait for Retry-After seconds.
500internal_errorThe write or the dataset creation failed and nothing was changed. Retry.
502source_unavailableThe chart's data source could not be read.
503api_disabledThe API is switched off for now. Try again later.
503rate_limit_unavailableThe rate limit could not be checked. Retry in a minute.
503maintenanceWrites are paused for maintenance. Reads still work.
503busyAnother write holds the dataset. Retry in a few seconds.
503idempotency_in_progressA write with this Idempotency-Key is still running. Retry after Retry-After seconds (5).
503idempotency_unavailableThe Idempotency-Key could not be checked, so the write was refused. Retry later.

Machine-readable

The same API as OpenAPI 3.1 at https://chartomodo.com/openapi.json, the whole reference as Markdown at https://chartomodo.com/llms-full.txt, and a skill file for coding assistants at https://chartomodo.com/developers/agents/skill.md. See /developers/agents.

n8n

On self-hosted n8n, install the community node n8n-nodes-chartomodo from Settings, Community Nodes; on n8n Cloud, until n8n lists the node, use the HTTP Request node with an Authorization header of Bearer and your token, an Idempotency-Key header that is new for each run and each item, and Retry On Fail with a 5 second wait, which covers 503 busy and 503 idempotency_in_progress; the n8n guide in the docs walks through both.

May we use Google Analytics cookies to count visits to our public pages, and remember which link brought you here in case you sign up? Nothing inside the app or your embeds is ever tracked. Privacy Policy