---
title: "Upsert rows in a sheet"
method: PUT
path: "/dataset/{handle}/{col}/{row}/upsert-rows"
tags: ["data"]
---

# Upsert rows in a sheet

`PUT /dataset/{handle}/{col}/{row}/upsert-rows`

Upsert rows in an existing sheet. Column id and row number is used to specify start position. Note that overlapping cells will be overwritten.

## Path parameters

- `handle` string, required
- `col` string, required
- `row` string, required

## Request body

- UpsertrowsRequest
  - `cells` array[]
    - string[]
  - `requestAgGrid` StructsRequestAgGrid
    - `AllowUnstableOrder` boolean — API may set true to allow unstable result order for faster performance on large files
    - `FieldTypes` string[] — if the app work with pivot mode the system should check type of field by ex. int, float, string
    - `endRow` integer
    - `filterModel` object
    - `groupKeys` unknown[]
      - unknown
    - `pivotCols` StructsColumnVO[]
      - `aggFunc` string
      - `displayName` string
      - `field` string
      - `groupFunc` string
      - `id` string
    - `pivotMode` boolean
    - `rowGroupCols` StructsColumnVO[]
      - `aggFunc` string
      - `displayName` string
      - `field` string
      - `groupFunc` string
      - `id` string
    - `sortModel` StructsSortEntry[]
      - `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
    - `startRow` integer
    - `ungroupedAggregations` StructsColumnVO[]
      - `aggFunc` string
      - `displayName` string
      - `field` string
      - `groupFunc` string
      - `id` string
    - `valueCols` StructsColumnVO[]
      - `aggFunc` string
      - `displayName` string
      - `field` string
      - `groupFunc` string
      - `id` string

## Response `200`

OK

- StructsResponse
  - `Message` string
  - `Success` boolean

## 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/revisions/d1e5cbb24557/schema)
