---
title: "Update contact view"
method: PATCH
path: "/v2/api/crm/views/{id}"
tags: ["CRM"]
---

# Update contact view

`PATCH /v2/api/crm/views/{id}`

## Request

- Base URL: `https://api.withallo.com`
- URL: `https://api.withallo.com/v2/api/crm/views/{id}`
- Auth: API key in header `Authorization`

Partially updates a view: only the fields you send change. `filters: []` clears the filters. Updating a team view requires being its owner or a team ADMIN or MANAGER. Returns 400 `INVALID_REQUEST_BODY` (per-field `errors[]`) for a blank or too long `name` or more than 50 `filters`; `INVALID_FILTER_FIELD`, `INVALID_FILTER_OPERATOR`, `INVALID_FILTER_VALUE`, `INVALID_SORT_FIELD` or `FIELD_NOT_SORTABLE` for an invalid filter or sort; `USER_HAS_NO_TEAM` for `owner_type: TEAM` when the user has no team; 403 `VIEW_PERMISSION_DENIED` for a team view you do not own unless you are a team ADMIN or MANAGER; 404 `VIEW_NOT_FOUND` for a view you cannot see, such as another user's private view.

## Path parameters

- `id` string, required

## Request body

- UpdateCrmViewRequest: All fields are optional. An omitted field is unchanged. `filters: []` clears the filters.
  - `name` string: New name. Must not be blank when sent
  - `filters` CrmViewFilter[]: Conditions combined with AND. At most 50
    - `field` string, required: A built-in person field (`name`, `company`, `job_title`, `emails`, `phone_numbers`, `website`, `addresses`, `created_at`, `updated_at`, `last_activity`, `activity_history`, `sms_content` (only when the team has SMS)) or the `key` of a custom field from `GET /v2/api/crm/attributes`. An unknown field returns 400 `INVALID_FILTER_FIELD`
    - `operator` 'IS' | 'IS_NOT' | 'CONTAINS' | 'NOT_CONTAINS' | 'EMPTY' | 'NOT_EMPTY' | 'STARTS_WITH' | 'ENDS_WITH' | 'BEFORE' | 'AFTER' | 'DATE_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL' | 'HAS', required: Comparison operator. It must match the type of the field, otherwise the request returns 400 `INVALID_FILTER_OPERATOR`
    - `value` string, required: Value to compare to. It must be readable for the type of the field, otherwise the request returns 400 `INVALID_FILTER_VALUE`: numeric for a number field, an ISO 8601 date such as `2026-01-31` or date-time such as `2026-01-31T00:00:00Z` for a date field. Ignored for `EMPTY` and `NOT_EMPTY`
  - `sort` CrmViewSort[]: Up to 2 entries. Sortable built-in fields: `name`, `company`, `job_title`, `website`, `created_at`, `updated_at`, `last_activity`. A sortable custom field `key` from `GET /v2/api/crm/attributes` also works
    - `field` string, required: A sortable built-in person field (`name`, `company`, `job_title`, `website`, `created_at`, `updated_at`, `last_activity`) or the `key` of a sortable custom field from `GET /v2/api/crm/attributes`
    - `order` 'asc' | 'desc', required
  - `owner_type` 'USER' | 'TEAM': `USER` is private to the API key's user. `TEAM` is shared with the user's team; it returns 400 `USER_HAS_NO_TEAM` when the user has no team.

## Response `200`

The updated view

- object
  - `data` CrmView: A saved view: a named filter and sort over people. Views created in the Allo app and with the API are the same objects.
    - `id` string: Public ID of the view
    - `name` string
    - `filters` CrmViewFilter[]
      - `field` string, required: A built-in person field (`name`, `company`, `job_title`, `emails`, `phone_numbers`, `website`, `addresses`, `created_at`, `updated_at`, `last_activity`, `activity_history`, `sms_content` (only when the team has SMS)) or the `key` of a custom field from `GET /v2/api/crm/attributes`. An unknown field returns 400 `INVALID_FILTER_FIELD`
      - `operator` 'IS' | 'IS_NOT' | 'CONTAINS' | 'NOT_CONTAINS' | 'EMPTY' | 'NOT_EMPTY' | 'STARTS_WITH' | 'ENDS_WITH' | 'BEFORE' | 'AFTER' | 'DATE_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL' | 'HAS', required: Comparison operator. It must match the type of the field, otherwise the request returns 400 `INVALID_FILTER_OPERATOR`
      - `value` string, required: Value to compare to. It must be readable for the type of the field, otherwise the request returns 400 `INVALID_FILTER_VALUE`: numeric for a number field, an ISO 8601 date such as `2026-01-31` or date-time such as `2026-01-31T00:00:00Z` for a date field. Ignored for `EMPTY` and `NOT_EMPTY`
    - `sort` CrmViewSort[]
      - `field` string, required: A sortable built-in person field (`name`, `company`, `job_title`, `website`, `created_at`, `updated_at`, `last_activity`) or the `key` of a sortable custom field from `GET /v2/api/crm/attributes`
      - `order` 'asc' | 'desc', required
    - `owner_type` 'USER' | 'TEAM': `USER` is private to the API key's user. `TEAM` is shared with the user's team.
    - `user_id` string, nullable: ID of the user who owns a `USER` view
    - `team_id` string, nullable: ID of the team a `TEAM` view belongs to
    - `created_at` string
    - `updated_at` string

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: API key lacks the required scope or access to the resource
- `404`: Resource not found
- `429`: Rate limit exceeded

## Changes

- **2026-11-03** `46c77103dd14`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/withallo/apis/allo-api/changes/v2/api/crm/views/:id/patch.md)

---

[API](https://skmtc.dev/withallo/apis/allo-api.md) - [All operations](https://skmtc.dev/withallo/apis/allo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withallo/apis/allo-api/revisions/46c77103dd14?raw)
