> ## Documentation Index
> Fetch the complete documentation index at: https://trigger.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete dashboard widget

> Remove a widget from a custom dashboard.



## OpenAPI

````yaml v3-openapi DELETE /api/v1/query/dashboards/{dashboardId}/widgets/{widgetId}
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/query/dashboards/{dashboardId}/widgets/{widgetId}:
    parameters:
      - name: dashboardId
        in: path
        required: true
        description: The custom dashboard id, starting with `dashboard_`
        schema:
          type: string
      - name: widgetId
        in: path
        required: true
        description: The widget id
        schema:
          type: string
    delete:
      tags:
        - query
      summary: Delete a dashboard widget
      description: Remove a widget from a custom dashboard.
      operationId: delete_dashboard_widget_v1
      parameters:
        - name: revision
          in: query
          required: false
          description: >-
            The revision you last read. The delete fails with a 409 if the
            dashboard changed since.
          schema:
            type: string
      responses:
        '200':
          description: The updated dashboard
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardObject'
        '404':
          description: Dashboard or widget not found
        '409':
          description: The dashboard changed since `revision` was read
      security:
        - secretKey: []
      x-codeSamples:
        - lang: typescript
          source: |-
            import { query } from "@trigger.dev/sdk";

            await query.dashboards.widgets.del("dashboard_1234", "widget_1");
components:
  schemas:
    DashboardObject:
      type: object
      properties:
        id:
          type: string
          description: The dashboard id, starting with `dashboard_`
        title:
          type: string
        description:
          type: string
        revision:
          $ref: '#/components/schemas/DashboardRevision'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        widgets:
          type: array
          description: Widgets in grid order, top to bottom then left to right.
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              query:
                type: string
              display:
                $ref: '#/components/schemas/DashboardWidgetDisplay'
              fillGaps:
                type: boolean
              position:
                $ref: '#/components/schemas/DashboardWidgetPosition'
    DashboardRevision:
      type: string
      description: >-
        The `revision` from the dashboard you last read. Send it to reject the
        write with a 409 if someone else changed the dashboard in the meantime.
    DashboardWidgetDisplay:
      description: How the widget renders its query results.
      oneOf:
        - type: object
          title: Table
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - table
            prettyFormatting:
              type: boolean
              default: true
            sorting:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  desc:
                    type: boolean
        - type: object
          title: Chart
          required:
            - type
            - chartType
            - xAxisColumn
            - yAxisColumns
            - groupByColumn
            - stacked
            - sortByColumn
            - sortDirection
            - aggregation
          properties:
            type:
              type: string
              enum:
                - chart
            chartType:
              type: string
              enum:
                - bar
                - line
            xAxisColumn:
              type: string
              nullable: true
            yAxisColumns:
              type: array
              items:
                type: string
            groupByColumn:
              type: string
              nullable: true
            stacked:
              type: boolean
            sortByColumn:
              type: string
              nullable: true
            sortDirection:
              type: string
              enum:
                - asc
                - desc
            aggregation:
              type: string
              enum:
                - sum
                - avg
                - count
                - min
                - max
            seriesColors:
              type: object
              additionalProperties:
                type: string
        - type: object
          title: Big number
          required:
            - type
            - column
            - aggregation
          properties:
            type:
              type: string
              enum:
                - bignumber
            column:
              type: string
            aggregation:
              type: string
              enum:
                - sum
                - avg
                - count
                - min
                - max
                - first
                - last
            sortDirection:
              type: string
              enum:
                - asc
                - desc
            abbreviate:
              type: boolean
              default: false
            prefix:
              type: string
            suffix:
              type: string
        - type: object
          title: Section title
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - title
    DashboardWidgetPosition:
      type: object
      description: A position on the dashboard's 12-column grid.
      required:
        - x
        - 'y'
        - w
        - h
      properties:
        x:
          type: integer
          minimum: 0
          maximum: 11
        'y':
          type: integer
          minimum: 0
        w:
          type: integer
          minimum: 1
          maximum: 12
        h:
          type: integer
          minimum: 1
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use a named environment API key. It starts with `tr_dev_sk_`,
        `tr_prod_sk_`, `tr_stg_sk_`, etc.


        Create a named API key in the API Keys section of your Trigger.dev
        project dashboard. Choose the narrowest access preset that supports your
        integration.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_sk_1234" });

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.