---
title: "Set sort model"
method: PUT
path: "/client-state/{handle}/sort-model"
tags: ["file"]
---

# Set sort model

`PUT /client-state/{handle}/sort-model`

Set sort model in the client state of a sheet.

## Path parameters

- `handle` string, required

## Request body

- ClientstateSetSortModelRequest
  - `sortModel` ClientstateSortModel[]
    - `colId` string
    - `pivotFieldGroupId` string — if pivot mode is enabled it can be sorted by pivot field group id (the column headers in pivot mode)
    - `sort` string

## Response `200`

OK

- unknown

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.net/freshdesk/apis/gigasheet-api.md) · [All operations](https://skmtc.net/freshdesk/apis/gigasheet-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/freshdesk/gigasheet-api/versions/d1e5cbb24557/schema)
