# addViewToGroup

Mutation

Add a saved view to one view group. Its other groups stay; adding a current member changes nothing.

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

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `groupId` | `ID!` | Yes | — | UUID of the ViewGroup to add the view to. |
| `viewId` | `ID!` | Yes | — | FilterPreset UUID of the Content View, Social Profile View, or Creator View to add. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `changed` | `Boolean` | True when the call added the view. False when the view already was a member. Null on failure. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | List of user-facing errors. Empty on success. |
| `viewGroup` | [`ViewGroup`](/api/v2/docs/types/view-group) | The ViewGroup with its members after the call. Null when the group or view was not found, or the write failed. |

## Examples

### Add a view to a group

Add a saved view to one more view group while it keeps its other groups.

```graphql
mutation AddViewToGroupDefault($groupId: ID!, $viewId: ID!) {
  addViewToGroup(groupId: $groupId, viewId: $viewId) {
    viewGroup {
      id
      name
      memberIds
    }
    changed
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "groupId": "8e0f0ff1-8024-5af5-9506-49091f53a920",
  "viewId": "8d6ddb76-8b81-5725-a762-2d2e18432dcf"
}
```

Response — HTTP 200:

```json
{
  "data": {
    "addViewToGroup": {
      "viewGroup": {
        "id": "8e0f0ff1-8024-5af5-9506-49091f53a920",
        "name": "Northwind Sidebar",
        "memberIds": [
          "eaa824b8-374f-5db8-bee2-51dfd8c3776c",
          "8d6ddb76-8b81-5725-a762-2d2e18432dcf"
        ]
      },
      "changed": true,
      "userErrors": []
    }
  }
}
```
