> ## Documentation Index
> Fetch the complete documentation index at: https://help.withallo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update view

> 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.

> [!NOTE]
>
> **Required scope:** `CRM_WRITE`

This endpoint performs a partial update. Only the fields you send are modified. Send `filters: []` to clear the filters.

## Body fields

| Field | Type | Description |
| - | - | - |
| `name` | string | New display name, up to 255 characters. Must not be blank when sent |
| `filters` | array | Replaces all the conditions. `[]` clears them. Up to 50 |
| `sort` | array | Replaces the sort. Up to 2 entries. `field` is a sortable built-in field (`name`, `company`, `job_title`, `website`, `created_at`, `updated_at`, `last_activity`) or the `key` of a sortable custom field from [List custom fields](https://help.withallo.com/en/v2/api-reference/crm/list-attributes.md) |
| `owner_type` | string | `USER` or `TEAM` |

```json theme={null}
{ "name": "Acme leads" }
```

Updating a team view requires being its owner or a team ADMIN or MANAGER.

## Response

Returns `200` with the updated view, in the same shape as [Get view](https://help.withallo.com/en/v2/api-reference/crm/get-view.md).

## Errors

| Status | Code | When |
| - | - | - |
| `400` | `INVALID_REQUEST_BODY` | `name` is blank or longer than 255 characters, `filters` has more than 50 entries, or `owner_type` is not `USER` or `TEAM`. Field-level problems are listed in `errors[]` with the `field` (`name` or `filters`) |
| `400` | `INVALID_FILTER_FIELD` | A filter `field` is neither a built-in person field nor the `key` of a custom field from `GET /v2/api/crm/attributes`. `param` is `filters` |
| `400` | `INVALID_FILTER_OPERATOR` | A filter `operator` does not match the type of its field. The message names the field. `param` is `filters` |
| `400` | `INVALID_FILTER_VALUE` | A filter `value` cannot be read for the type of its field: a number field needs a numeric value, a date field needs an ISO 8601 date such as `2026-01-31` or `2026-01-31T00:00:00Z`. The message names the value and the field. `param` is `filters` |
| `400` | `INVALID_SORT_FIELD` | A sort `field` is neither a built-in field nor a custom field `key` from `GET /v2/api/crm/attributes`. `param` is `sort` |
| `400` | `FIELD_NOT_SORTABLE` | A sort `field` exists but cannot be sorted on. Use a built-in sortable field or a sortable custom field. `param` is `sort` |
| `400` | `USER_HAS_NO_TEAM` | `owner_type` is `TEAM` but you do not belong to a team. Use `USER`. `param` is `owner_type` |
| `403` | `API_KEY_INSUFFICIENT_SCOPE` | The key does not hold `CRM_WRITE` |
| `403` | `VIEW_PERMISSION_DENIED` | The view is a team view and you are neither its owner nor a team ADMIN or MANAGER |
| `404` | `VIEW_NOT_FOUND` | No view with this ID, or you cannot see it (for example another user's private view) |


## OpenAPI

````yaml PATCH /v2/api/crm/views/{id}
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
  - name: Notes
    description: >-
      Internal team notes on conversations and CRM people, with @mention
      support. Notes are never visible to the contact.
  - name: Threads
    description: >-
      Team discussion threads attached to a conversation item (call, SMS, or
      conversation note). One thread per item.
  - name: AI Receptionist
    description: >-
      Read and write the AI receptionist configuration of a phone line: business
      details, voice, prompt, capabilities, business hours, transfer rules,
      scheduling calendars and knowledge sources.
paths:
  /v2/api/crm/views/{id}:
    patch:
      tags:
        - CRM
      summary: Update contact view
      description: >-
        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.
      operationId: updateCrmView
      parameters:
        - name: id
          in: path
          required: true
          description: Public ID of the view, as returned by the list endpoint
          schema:
            type: string
            example: cvw_2abc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCrmViewRequest'
            example:
              name: Acme leads
      responses:
        '200':
          description: The updated view
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CrmView'
              example:
                data:
                  id: cvw_2abc
                  name: Acme leads
                  filters:
                    - field: company
                      operator: CONTAINS
                      value: Acme
                  sort:
                    - field: created_at
                      order: desc
                  owner_type: USER
                  user_id: usr_2abc
                  team_id: null
                  created_at: '2026-10-23T10:00:00'
                  updated_at: '2026-10-23T10:00:00'
        '400':
          $ref: '#/components/responses/ApiValidationError'
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '403':
          $ref: '#/components/responses/ApiForbidden'
        '404':
          $ref: '#/components/responses/ApiNotFound'
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateCrmViewRequest:
      type: object
      description: >-
        All fields are optional. An omitted field is unchanged. `filters: []`
        clears the filters.
      properties:
        name:
          type: string
          maxLength: 255
          example: Hot leads
          description: New name. Must not be blank when sent
          pattern: \S
        filters:
          type: array
          description: Conditions combined with AND. At most 50
          items:
            $ref: '#/components/schemas/CrmViewFilter'
          maxItems: 50
        sort:
          type: array
          maxItems: 2
          items:
            $ref: '#/components/schemas/CrmViewSort'
          description: >-
            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
        owner_type:
          type: string
          enum:
            - USER
            - TEAM
          description: >-
            `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.
          example: USER
    CrmView:
      type: object
      description: >-
        A saved view: a named filter and sort over people. Views created in the
        Allo app and with the API are the same objects.
      properties:
        id:
          type: string
          description: Public ID of the view
          example: cvw_2abc
        name:
          type: string
          example: Hot leads
        filters:
          type: array
          items:
            $ref: '#/components/schemas/CrmViewFilter'
        sort:
          type: array
          items:
            $ref: '#/components/schemas/CrmViewSort'
        owner_type:
          type: string
          enum:
            - USER
            - TEAM
          description: >-
            `USER` is private to the API key's user. `TEAM` is shared with the
            user's team.
          example: USER
        user_id:
          type: string
          nullable: true
          description: ID of the user who owns a `USER` view
          example: usr_2abc
        team_id:
          type: string
          nullable: true
          description: ID of the team a `TEAM` view belongs to
        created_at:
          type: string
          example: '2026-10-23T10:00:00'
        updated_at:
          type: string
          example: '2026-10-23T10:00:00'
    CrmViewFilter:
      type: object
      required:
        - field
        - operator
        - value
      description: One condition of a view. All conditions of a view are combined with AND.
      properties:
        field:
          type: string
          description: >-
            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`
          example: company
        operator:
          type: string
          enum:
            - 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
          description: >-
            Comparison operator. It must match the type of the field, otherwise
            the request returns 400 `INVALID_FILTER_OPERATOR`
          example: CONTAINS
        value:
          type: string
          description: >-
            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`
          example: Acme
    CrmViewSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          type: string
          description: >-
            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`
          example: created_at
        order:
          type: string
          enum:
            - asc
            - desc
          example: desc
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
            retry_after_seconds:
              type: integer
              nullable: true
  responses:
    ApiValidationError:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiForbidden:
      description: API key lacks the required scope or access to the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiNotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.