---
title: "Update View"
method: PUT
path: "/folder/{folderId}/views/{viewId}"
tags: ["Folder"]
---

# Update View

`PUT /folder/{folderId}/views/{viewId}`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/folder/{folderId}/views/{viewId}`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

Update an existing view. Note: isDefault is required in update operation.

## Path parameters

- `folderId` string, required
- `viewId` string, required

## Request body

- object
  - `name` string, required: The new name for the view. Required.
  - `isDefault` boolean, required: Whether this view is the folder's default view. Unlike the create call, you must send this value on every update. Setting it to true clears the default flag on your other active views in the folder. Required, with no default declared, so omitting it returns 400.
  - `columns` object[], required: The full set of columns the view shows, in display order. This replaces the view's existing columns. Required. Each entry must be an object matching columnSchema. No cap on the number of entries. An empty array passes validation, because the array has no.min.
    - `fieldId` string: The ID of the custom field this column shows. Leave it empty for a built-in column. Optional. Empty string and null are accepted.
    - `name` string: The heading shown for this column. Required.
    - `type` 'text' | 'url' | 'boolean' | 'date' | 'datetime' | 'number' | 'currency' | 'name' | 'duration' | 'tags' | 'sentiment' | 'size' | 'mediaType' | 'createdAt' | 'updatedAt': What kind of value the column holds. The accepted set is the FieldType values followed by the DefaultViewColumn values. Required. The value must be one of the listed values. The set is built from Object.values(FieldType) and Object.values(DefaultViewColumn), both declared in speak-shared and re-exported through and The raw.valid list contains "datetime" twice, because it appears in both enums; the accepted set is the 15 distinct values listed here.
    - `definition` string: An optional label describing what the column is derived from. Optional. Empty string and null are accepted.
    - `order` number: The position of the column in the view, counting from zero. The server replaces a value of 0 with the column's position in the array you sent, so a column with order 0 in third position is stored as 2. Required. Declared as Any number passes; there is no minimum and no integer-only rule. The handler stores col.order || index, which is why 0 is overwritten.

## Response `200`

Success. This spec records no example response body for this endpoint.

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
