# deleteViewGroup

Mutation

Hard-delete a user-created view group. Returns the FilterPreset UUIDs whose group membership was removed so clients can invalidate cached views.

Available to agents as MCP tool `deleteViewGroup` — see [Write tools](/api/v2/docs/mcp/write-tools#delete-view-group).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `ID!` | Yes | — | UUID of the view group to delete. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `deletedViewGroupId` | `ID` | The id of the deleted view group. Null when the group did not exist. |
| `movedViewIds` | `[ID!]!` | FilterPreset UUIDs whose group membership row was deleted as a side effect. Clients should invalidate any cached `ContentView` / `SocialProfileView` rows in this list. Empty on not-found or when the group had no member views. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | List of user-facing errors. Populated only when deletion failed. |

## Examples

### Delete a view group

Hard-delete a view group and report which views lost membership.

```graphql
mutation DeleteViewGroupDefault($id: ID!) {
  deleteViewGroup(id: $id) {
    deletedViewGroupId
    movedViewIds
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "id": "8e0f0ff1-8024-5af5-9506-49091f53a920"
}
```

Response — HTTP 200:

```json
{
  "data": {
    "deleteViewGroup": {
      "deletedViewGroupId": "8e0f0ff1-8024-5af5-9506-49091f53a920",
      "movedViewIds": [
        "eaa824b8-374f-5db8-bee2-51dfd8c3776c"
      ],
      "userErrors": []
    }
  }
}
```
