---
title: "POST /api/dashboard/{dashboard_id}/widgets/"
method: POST
path: "/api/dashboard/{dashboard_id}/widgets/"
tags: ["Dashboard widgets"]
---

# POST /api/dashboard/{dashboard_id}/widgets/

`POST /api/dashboard/{dashboard_id}/widgets/`

Creates a new dashboard widget

## Path parameters

- `dashboard_id` integer, required

## Headers

- `ClientSessionId` string, uuid
- `ClientUndoRedoActionGroupId` string, uuid

## Request body

- union
  - SummaryWidgetCreateWidget — This serializer allow to set the type of the new widget.
    - `title` string, required
    - `description` string
    - `type` 'summary' | 'chart' | 'pie_chart', required — * `summary` - summary * `chart` - chart * `pie_chart` - pie_chart
  - ChartWidgetCreateWidget — This serializer allow to set the type of the new widget.
    - `title` string, required
    - `description` string
    - `type` 'summary' | 'chart' | 'pie_chart', required — * `summary` - summary * `chart` - chart * `pie_chart` - pie_chart
    - `series_config` ChartSeriesConfig[] — Provides series configuration.
      - `series_id` integer, required
      - `series_chart_type` 'BAR' | 'LINE', required — * `BAR` - Bar * `LINE` - Line
    - `default_series_chart_type` 'BAR' | 'LINE' — * `BAR` - Bar * `LINE` - Line
  - PieChartWidgetCreateWidget — This serializer allow to set the type of the new widget.
    - `title` string, required
    - `description` string
    - `type` 'summary' | 'chart' | 'pie_chart', required — * `summary` - summary * `chart` - chart * `pie_chart` - pie_chart
    - `series_config` PieChartSeriesConfig[] — Provides series configuration.
      - `series_id` integer, required
      - `series_chart_type` 'PIE' | 'DOUGHNUT', required — * `PIE` - Pie * `DOUGHNUT` - Doughnut
    - `default_series_chart_type` 'PIE' | 'DOUGHNUT' — * `PIE` - Pie * `DOUGHNUT` - Doughnut

## Response `200`

- union
  - SummaryWidgetWidget — Basic widget serializer mostly for returned values.
    - `id` integer, required
    - `title` string, required
    - `description` string, required
    - `dashboard_id` integer, required
    - `type` string, required — The type of the widget.
    - `order` string, decimal, required — Lowest first.
    - `data_source_id` integer — References a data source field for the widget.
  - ChartWidgetWidget — Basic widget serializer mostly for returned values.
    - `id` integer, required
    - `title` string, required
    - `description` string, required
    - `dashboard_id` integer, required
    - `type` string, required — The type of the widget.
    - `order` string, decimal, required — Lowest first.
    - `data_source_id` integer — References a data source field for the widget.
    - `series_config` ChartSeriesConfig[] — Provides series configuration.
      - `series_id` integer, required
      - `series_chart_type` 'BAR' | 'LINE', required — * `BAR` - Bar * `LINE` - Line
    - `default_series_chart_type` 'BAR' | 'LINE' — * `BAR` - Bar * `LINE` - Line
  - PieChartWidgetWidget — Basic widget serializer mostly for returned values.
    - `id` integer, required
    - `title` string, required
    - `description` string, required
    - `dashboard_id` integer, required
    - `type` string, required — The type of the widget.
    - `order` string, decimal, required — Lowest first.
    - `data_source_id` integer — References a data source field for the widget.
    - `series_config` PieChartSeriesConfig[] — Provides series configuration.
      - `series_id` integer, required
      - `series_chart_type` 'PIE' | 'DOUGHNUT', required — * `PIE` - Pie * `DOUGHNUT` - Doughnut
    - `default_series_chart_type` 'PIE' | 'DOUGHNUT' — * `PIE` - Pie * `DOUGHNUT` - Doughnut

## Other responses

- `400`
- `401`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/revisions/0c490e5b0c7f/schema)
