Skip to main content
POST
Create a chart

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes retrying this request safe: a retry with the same key and body returns the original response without running the operation again. Keys are kept for 24 hours after the request completes.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Path Parameters

dashboardId
string
required

The ID of the dashboard to add the chart to.

Required string length: 40

Body

application/json

The settings of a chart, as a chart carries them once read: its name, its type, what it measures, the fields it is grouped and broken down by, and its filter. Which ones it takes depends on its type. A chart must be working once created: every field and choice it names must exist, and be of a kind the type and the measure can use.

name
string
required

The name of the chart, as shown in the app.

Required string length: 1 - 500
Example:

"Leads by status"

type
enum<string>
required
Available options:
metric
measure
Count · object
required

What the number of the chart is.

filter
object | null

The filter of the chart, in the format of the filter of a view, null or absent for no filter. The chart only covers the records that match it. It takes the custom fields of the dashboard, and the native fields interactionMetadata.workspace.lastInteractedAt, createdAt or createdBy on people, createdAt, createdBy or name on companies and objects.

groupBy
null

null or absent: this type of chart has no group-by.

breakdownBy
null

null or absent: this type of chart has no breakdown-by.

Response

The created chart, as "get a chart" returns it, with its data.

data
Metric chart · object
required

A chart of a dashboard: what it computes, its status, and its data when it is working.

Example:
deprecations
string[]
Example: