> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# supportViewFolderUpdate

> Rename a folder in the help desk sidebar, or move it among the folders with `position`. Its views stay in it. Null when the store has no folder with this id. Throws a 409 CONFLICT error when another folder has the new name, a deleted one included, and a 400 BAD_USER_INPUT error when the name is blank or too long.

**Required scopes:** [`support_config_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_config_write)

## Arguments

**id** `ID!` *required*

The id of the folder to change.

**input** `[SupportViewFolderUpdateInput!](/docs/api-reference/v3/reference/support/support-view-folder-update-input)` *required*

The changes to make.

**fields**

**name** `String`

The folder's new name, with the rules `supportViewFolderCreate` gives a name.

**position** `Int`

Moves the folder to this 0-based place among the store's folders, as dragging it in the sidebar does; the folders from there on move down one. Past the end puts it last. Negative is BAD\_USER\_INPUT.

## Returns

**supportViewFolderUpdate** `[SupportViewFolder](/docs/api-reference/v3/reference/support/support-view-folder)`

A folder that groups views in the help desk sidebar.

**fields**

**id** `ID!` *required*

The id of this folder.

**name** `String!` *required*

The folder's name, unique within the store.

**position** `Int!` *required*

The folder's 0-based place among the store's folders in the help desk sidebar, as `supportViewFolders` lists them: the first is 0, with no gaps. A team member who reorders their own sidebar sees their own order instead.

**views** `[SupportViewConnection!](/docs/api-reference/v3/pagination)` *required*

The folder's shared views, in sidebar order.

**Requires:** [`support_config_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_config_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns views after it.

**before** `String`

Backward pagination cursor — returns views before it.

**first** `Int`

Forward pagination: returns the first N views (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N views (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[SupportViewEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[SupportView!](/docs/api-reference/v3/reference/support/support-view)` *required*

The item at this edge.

**nodes** `[\[SupportView!\]!](/docs/api-reference/v3/reference/support/support-view)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the view was created.

**filters** `[SupportViewFilters](/docs/api-reference/v3/reference/support/support-view-filters)`

The view's filters. Null when the view uses a filter, or a combination, the API has no field for; `tickets` still lists its tickets.

**folder** `[SupportViewFolder](/docs/api-reference/v3/reference/support/support-view-folder)`

The folder the view sits in. Null when it's in none.

**Requires:** [`support_config_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_config_read)

**id** `ID!` *required*

The id of this view.

**name** `String!` *required*

The view's name, unique among the store's shared views.

**orderBy** `[SupportTicketSortKey!](/docs/api-reference/v3/reference/support/support-ticket-sort-key)` *required*

How the view sorts its tickets. LAST\_RESPONSE\_AT when it saved no order.

**position** `Int!` *required*

The view's 0-based place among the shared views in its folder, or among those in no folder, in the help desk sidebar: the first is 0, with no gaps. List one group in this order with `supportViews(folderId:)`. A team member who reorders their own sidebar sees their own order instead.

**reverse** `Boolean!` *required*

Whether the view reverses `orderBy`, oldest or lowest first.

**ticketCount** `Int`

How many tickets the view has: the number `tickets` pages through, and `supportTicketCount` gives for the same filters. It's counted by the same service as the count the help desk shows beside the view in the sidebar, and like it leaves out hidden, deleted and merged tickets. It differs from the sidebar only where the API never lists a ticket: the sidebar also counts demo tickets, and hidden or deleted ones when the view's own filters ask for those statuses. Null when the saved filters can't be read. A page's views are counted in one call, 50 points for each count made, as `supportTicketCount` costs; each `ticketCount` field in a query reserves 50 counts, and the request is refunded the ones it didn't make. Views with the same filters, or one view named more than once, share one count. A request can make at most 50 distinct counts, and past that this field errors with TOO\_MANY\_VIEW\_COUNTS. Search-indexed, so it can trail writes by a few seconds.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**tickets** `[SupportTicketConnection](/docs/api-reference/v3/pagination)`

The view's tickets in its saved order, as the help desk lists them: spam and the AI agent's tickets are left out unless the view's filters ask for them. Null when the saved filters can't be read. Search-indexed, so it can trail writes by a few seconds.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tickets after it.

**before** `String`

Backward pagination cursor — returns tickets before it.

**first** `Int`

Forward pagination: returns the first N tickets (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tickets (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the view last changed.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `API_TOKEN_REQUIRED` | `403` | The credential has no API token to attribute the change to, such as a first-party token. Nothing was sent. | Call with a store API token. |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `CONFLICT` | `409` | The change clashes with another record, such as a name already in use, and nothing was written. Or a request with the same idempotencyKey is still in progress or its outcome isn't known yet, and its write, such as an email to the customer, may already exist. | Change the clashing value, then send it again. When the message says a request with the same idempotencyKey is still in progress, wait a few seconds and send it again with the same key, which returns that request's result once it settles. Don't resend it with a new key or without one: it may write twice. |
| `INTERNAL_SERVER_ERROR` | `500` | Something failed on Redo's side. The change may or may not have been made. | Read the record to see whether the change was made before sending it again. A send with an idempotencyKey is safe to retry with the same key. |

## Example

```graphql theme={null}
mutation {
  supportViewFolderUpdate(id: "...", input: { ... }) {
    id
    name
    position
    views {
      nodes {
        createdAt
        id
        name
        orderBy
        position
        reverse
        ticketCount
        updatedAt
      }
      pageInfo { hasNextPage endCursor }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.