Contract Intelligence

Update a saved view

Rename a saved view, replace its layout, or both. Send at least one of name and view_state.

view_state is a full replacement of all four of hidden_field_keys, field_order, sort, and filters. A field you leave out of the object is cleared, not kept, so read the view with GET /vaults/{id}/views first when you mean to change one part of it.

Column visibility is stored as a hide list. hidden_field_keys names the columns a view hides, so an empty list means the view shows every column the vault has. A column added to the vault later appears in the view until you hide it.

Every field key has to exist in the vault. Keys in hidden_field_keys and field_order can also name a system column (actions, fileName, relationships, extractedAt, sourceName). sort.field takes a vault column or one of fileName, extractedAt, sourceName, because those are the only system columns the table can sort by. A filter field_key takes a vault column or __notes__, the any-column notes filter. Anything else returns 400 naming the keys it could not place, rather than being dropped on the way in and leaving you with a view that ignores half of what you sent.

The view has to belong to the vault in the path. A view ID from another vault returns 404, even when the caller can reach both vaults.

A change here is visible to every member of the vault, because views are shared rather than per-person.

Requires the editor or owner role in the vault, the organization-level permission to manage vaults, and the organization-level Manage Views permission. A caller who holds the vault role but not both permissions gets 403.

Requires a user-scoped API key (u:gcai_...). A vault is shared with named people, so an organization-scoped key has no identity to resolve vault access with.

patch/vaults/{id}/views/{viewId}

Request

Path parameters

idstring uuid required

The vault ID

viewIdstring uuid required

View ID from GET /vaults/{id}/views.

Request body

namestring

New view name.

Example request

{
  "view_state": {
    "sort": {
      "field": "effectiveDate"
    },
    "filters": [
      {
        "field_key": "governingLaw"
      }
    ]
  }
}

Response

The updated view

idstring uuid required

Unique view identifier

vault_idstring uuid required

Vault this view belongs to

namestring required

View name, as shown on its tab in the app

positioninteger required

Zero-based slot this view occupies in the vault view order. Read-only over the API: reordering views is not available here yet.

created_by_user_idinteger nullable required

GC AI user ID of whoever created the view, or null when that person has since been removed. Provenance only: a view is shared with the whole vault and is not owned by its creator.

created_atstring required

ISO 8601 creation timestamp

updated_atstring required

ISO 8601 last-update timestamp

Example response

{
  "name": "Renewals this quarter",
  "view_state": {
    "sort": {
      "field": "effectiveDate"
    },
    "filters": [
      {
        "field_key": "governingLaw"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.