Developer API
Update Database View
V2

Update Database View

Update a view's title, layout, filter, sorts, grouping, config, or manual order.

PATCH /v2/databases/:database_id/views/:view_id

Update Database View

Use Case

Use this endpoint to rename a view, adjust the column layout (visibility/order/width), replace the filter or sorts, configure grouping, or replace the manual record order in full.

Endpoint

Item Value
Method PATCH
Path /v2/databases/:database_id/views/:view_id
Request body UpdateDatabaseViewRequest
Returns database_view
Scope databases.write
Concurrency Optional If-Match weak-ETag optimistic lock

Permissions

Requires databases.write and write access to the database.

Parameters

All fields are optional; each provided field is a full replacement:

Parameter Type Description
title string Title, at most 200 characters.
property_layout array Full replacement of the column layout; entries without width reuse the previous width, others use the default. Not supported for timeline/form.
filter object | null Web-client filter group; null clears the filter.
sorts array | null Web-client sorter array; null clears the sorters.
group_by object | null Replaces the exposed fields (property_id/hide_empty_groups/sort); internal-only fields are preserved. null clears grouping. Only table/board.
config object | null Full replacement of the exposed config keys for the type; exposed keys absent from the request are removed. null clears config.
page_sort array Full replacement of the manual order, at most 500 entries; ids must belong to the database and must not repeat.

The view type cannot be changed (create a new view to switch types).

Property references should use the exact property id returned by the database or view API. For backward compatibility, only property_layout[].property_id additionally accepts the literal title; when the schema has no exact title key, the API resolves it to the sole title property and stores its exact id.

For select and multi_select filters, pass the option id returned by Retrieve a database. A unique option name is also accepted for backward compatibility and is stored as its option id; unknown or ambiguous names return 400.

Request Example

curl -X PATCH https://api.buildin.ai/v2/databases/66666666-6666-4666-8666-666666666666/views/34343434-3434-4343-8343-343434343434 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H 'If-Match: W/"2026-04-09T09:30:00.000Z"' \
  -d '{
    "title": "In progress (edited)",
    "filter": {
      "type": "group",
      "operator": "or",
      "filters": [
        { "type": "filter", "property": "88888888-8888-4888-8888-888888888888", "operator": "eq", "value": "<option_id>" },
        { "type": "filter", "property": "12121212-1212-4212-8212-121212121212", "operator": "isNotEmpty", "value": "" }
      ]
    },
    "page_sort": ["77777777-7777-4777-8777-777777777777"]
  }'

Concurrency

  • With If-Match (the weak ETag returned by read responses): the server locks the view row inside the transaction and compares the version; a mismatch returns 409 and nothing is written.
  • Without If-Match: last write wins, consistent with other v2 resources.

Errors

Status Code Description
400 validation_error Unknown property reference; page_sort over 500 entries, with duplicates, or referencing foreign records; and so on.
403 forbidden Missing scope or no write access to the database.
404 not_found Database or view does not exist.
409 conflict If-Match mismatch.