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

# Delete widget

> Delete a widget.



## OpenAPI

````yaml delete /dashboards/{dashboard_id}/widgets/{widget_id}
openapi: 3.0.3
info:
  title: Coval Dashboards API
  version: 1.0.0
  description: |
    Create and manage dashboards and widgets for visualizing evaluation metrics.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Dashboards
    description: Dashboard CRUD operations
  - name: Widgets
    description: Dashboard widget CRUD operations
paths:
  /dashboards/{dashboard_id}/widgets/{widget_id}:
    delete:
      tags:
        - Widgets
      summary: Delete widget
      description: Delete a widget.
      operationId: deleteWidget
      parameters:
        - $ref: '#/components/parameters/DashboardId'
        - $ref: '#/components/parameters/WidgetId'
      responses:
        '200':
          description: Widget deleted successfully
          content:
            application/json:
              schema:
                type: object
                description: Empty response body
              example: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    DashboardId:
      name: dashboard_id
      in: path
      required: true
      schema:
        type: string
      description: Dashboard resource ID (22-character ShortUUID)
      example: abc123def456ghi789jklm
    WidgetId:
      name: widget_id
      in: path
      required: true
      schema:
        type: string
      description: Widget resource ID (22-character ShortUUID)
      example: wgt456xyz789abc012defg
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Resource not found
              details:
                - field: dashboard_id
                  description: Dashboard not found or not accessible by your organization
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred
  schemas:
    ErrorResponse:
      type: object
      description: Standard error response
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              description: Error code
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - NOT_FOUND
                - INTERNAL
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameter
            details:
              type: array
              description: Detailed error information
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                    description: Field that caused the error
                  description:
                    type: string
                    description: Detailed error description
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````