# reorderViewsInGroup

Mutation

Reorder the submitted Content View, Social Profile View, and Creator View ids within the named group. Members omitted from `viewIds` keep their relative order and sort after the listed views.

Available to agents as MCP tool `reorderViewsInGroup` — see [Write tools](/api/v2/docs/mcp/write-tools#reorder-views-in-group).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `groupId` | `ID!` | Yes | — | UUID of the ViewGroup whose member views should be reordered. |
| `viewIds` | `[ID!]!` | Yes | — | FilterPreset UUIDs in the desired display order. Must list only views that are currently members of this group. The first id becomes position 1. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `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 reordered ViewGroup. `contentViews`, `socialProfileViews`, and `creatorViews` reflect the new ordering in a single round-trip. Null when the group was not found or the reorder failed. |

## Examples

### Reorder views in a group

Reorder the member views within a view group.

```graphql
mutation ReorderViewsInGroupDefault($groupId: ID!, $viewIds: [ID!]!) {
  reorderViewsInGroup(groupId: $groupId, viewIds: $viewIds) {
    viewGroup {
      id
      name
    }
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "groupId": "8e0f0ff1-8024-5af5-9506-49091f53a920",
  "viewIds": [
    "eaa824b8-374f-5db8-bee2-51dfd8c3776c"
  ]
}
```

Response — HTTP 200:

```json
{
  "data": {
    "reorderViewsInGroup": {
      "viewGroup": {
        "id": "8e0f0ff1-8024-5af5-9506-49091f53a920",
        "name": "Northwind Sidebar"
      },
      "userErrors": []
    }
  }
}
```
