Skip to content

Update a widget ​

PATCH/api/v2/workspaces/{slug}/dashboards/{dashboard_id}/widgets/{pk}/

A widget is one chart on a dashboard. Change only the fields you send. A change that would leave the widget unable to show data is refused with 400, and nothing is saved.

Changing only the name, size, position or filters never fails on the chart settings. Filters you send are checked as described in Filters.

Path parameters ​

slug:requiredstring

The workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.

dashboard_id:requiredstring (uuid)

The dashboard the widget is on.

pk:requiredstring (uuid)

The widget ID. A widget on a different dashboard returns 404.

Body parameters ​

name:optionalstring

Display name, 1 to 255 characters.

chart_type:optionalstring

The chart type, for example BAR_CHART. See Chart types or List widget types.

chart_model:optionalstring

The variant of the chart type, for example STACKED. It must be one the chart type allows. Chart types without variants still need BASIC.

config:optionalobject

Settings for the chart type. Some chart types require keys here, for example columns on WORK_ITEMS_TABLE. See Chart types.

x_axis_property:optionalstring

Axis charts only, and required for them. A built-in property such as PRIORITY or STATE_GROUPS, or a custom work item property as cp_<property_id>. See Axis properties.

y_axis_metric:optionalstring

Axis charts and NUMBER only, and required for them. For example WORK_ITEM_COUNT. See Axis metrics.

x_axis_date_grouping:optionalstring

Bucket size when the x axis is a date: DAY, WEEK, MONTH or YEAR.

group_by:optionalstring

Axis charts only. A second grouping, with the same values as x_axis_property. BASIC and COMPARISON models clear it.

width:optionalinteger

Width on the dashboard grid, 0 or more. Default 1.

height:optionalinteger

Height on the dashboard grid, 0 or more. Default 1.

x_axis_coord:optionalinteger

Column on the dashboard grid, 0 or more. Default 0.

y_axis_coord:optionalinteger

Row on the dashboard grid, 0 or more. Default 0.

pql_filters:optionalobject

PQL filter for this widget only, on top of the dashboard's, as { "stripped": "<PQL>" }. It applies when last_used_filter is pql_filters. If you send a non-empty one without filters or last_used_filter, the widget switches last_used_filter to pql_filters. See Filters.

filters:optionalobject

Filter object for this widget only. It applies when last_used_filter is rich_filters. See Filters.

last_used_filter:optionalstring

Which widget filter applies: pql_filters, or rich_filters (applies filters). Default rich_filters.

rich_filters:optionalobject

The web app's filter-builder state. Stored and returned as sent; charts don't read it.

Response shaping ​

fields:optionalstring

Comma-separated list of fields to return. Fields you don't request are left out of the response instead of coming back as null. id is always included. Pass all to get every requestable field. An unknown field name returns 400. See Sparse fields.

Requestable here: chart_model, chart_type, config, created_at, created_by_id, dashboard_id, filters, group_by, height, id, last_used_filter, name, pql_filters, rich_filters, updated_at, updated_by_id, width, x_axis_coord, x_axis_date_grouping, x_axis_property, y_axis_coord, y_axis_metric.

Scopes ​

workspaces.dashboards.widgets:write, or the broad write scope.

Errors ​

StatusCodeCause
400invalid_requestThe widget doesn't fit its chart type: a missing config key or axis, a model the chart type doesn't allow, an unknown chart_type, or invalid filters. errors[] names the field.
401unauthorizedMissing or invalid credentials.
402payment_requiredDashboards, or this chart type, aren't included in the workspace's plan, or you aren't a member of the workspace.
403forbiddenYou can see the dashboard but can't edit it.
404not_foundThe dashboard or widget doesn't exist, or you can't see the dashboard.
406not_acceptableThe Accept header asks for a representation the API can't produce.
429rate_limitedThrottled. Wait for the Retry-After header's seconds before retrying.
Update a widget
bash
curl -X PATCH \
  "https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/0bda418f-3e9a-47bd-8e70-faa04e1f9540/" \
  -H "X-Api-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chart_model": "GROUPED",
  "x_axis_coord": 0
}'
Response200
json
{
  "id": "0bda418f-3e9a-47bd-8e70-faa04e1f9540",
  "dashboard_id": "05186e3b-94a3-49b0-8403-9307d292daea",
  "name": "Bar Chart",
  "chart_type": "BAR_CHART",
  "chart_model": "GROUPED",
  "config": {
    "group_by": "STATE_GROUPS",
    "y_axis_metric": "WORK_ITEM_COUNT",
    "x_axis_property": "PRIORITY",
    "x_axis_date_grouping": null
  },
  "x_axis_property": "PRIORITY",
  "x_axis_date_grouping": null,
  "y_axis_metric": "WORK_ITEM_COUNT",
  "group_by": "STATE_GROUPS",
  "height": 4,
  "width": 6,
  "x_axis_coord": 0,
  "y_axis_coord": 0,
  "filters": {},
  "pql_filters": {
    "json": {},
    "stripped": ""
  },
  "rich_filters": {},
  "last_used_filter": "rich_filters",
  "created_at": "2026-11-16T15:21:27.804027Z",
  "updated_at": "2026-11-16T15:21:35.255170Z",
  "created_by_id": "a5706ff6-df7d-4dac-947a-0a4fe14b6ed8",
  "updated_by_id": "a5706ff6-df7d-4dac-947a-0a4fe14b6ed8"
}
Response400
json
{
  "type": "invalid_request",
  "code": "invalid_request",
  "detail": "One or more fields failed validation.",
  "errors": [
    {
      "field": "chart_model",
      "code": "invalid",
      "message": "BAR_CHART does not support MULTI_LINE."
    }
  ]
}