---
updatedAt: 2025-11-20T18:49:36.000Z
agentTools:
  projectIndex: https://docs.cloudzero.com/llms.txt
---

# /v2/views/{view_id}

Delete a View

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "2.0.0",
    "title": "CloudZero API V2 Resources",
    "description": "CloudZero V2 API",
    "contact": {
      "name": "CloudZero Support",
      "url": "https://www.cloudzero.com/contact",
      "email": "support@cloudzero.com"
    },
    "license": {
      "name": "BSD 3",
      "identifier": "BSD-3"
    }
  },
  "servers": [
    {
      "url": "https://api.cloudzero.com"
    }
  ],
  "tags": [
    {
      "name": "views",
      "description": "View Resources"
    }
  ],
  "paths": {
    "/v2/views/{view_id}": {
      "delete": {
        "operationId": "deleteView",
        "description": "Delete a single View",
        "tags": [
          "views"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/cloudzero_idempotency_key"
          },
          {
            "$ref": "#/components/parameters/cloudzero_test_key"
          },
          {
            "$ref": "#/components/parameters/view_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/with_id"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequestError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "cloudzero_test_key": {
        "description": "If passed, the operation executes in the namespace specified by this key.\nResource mutations in the namespace last for 1 hour.\n",
        "name": "cloudzero-test-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "cloudzero_idempotency_key": {
        "description": "If passed, any subsequent operation with the same value for this header will return the exact same result.\nThis is true for all responses, i.e. successes and errors.\n",
        "name": "cloudzero-idempotency-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "view_id": {
        "description": "Unique View identifier",
        "name": "view_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "badRequestError": {
        "description": "Bad Request Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "with_id": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      }
    },
    "securitySchemes": {
      "APIKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {}
}
```