# delete_view

`tools/call` · `POST /agent/v1/views:delete`

Delete a view that is not the default; make another view the default first. Returns deleted: true with the view's slug. Needs write access, and your person must be in the view's team or one of its project's teams, or be a workspace owner or admin.

- Area: Planning
- Needs the write grant. Destructive. Idempotent.

## Inputs

- `team` (string): The team the view belongs to, such as WEB. Give team or project, not both.
- `project` (string): The project the view belongs to, such as docs-launch. Give team or project, not both.
- `view` (string, required): A view's slug, such as active.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_view",
    "arguments": {
      "team": "WEB",
      "view": "docs-search"
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/views:delete \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "team": "WEB",
    "view": "docs-search"
  }'
```
