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

# Update company view

> Update a company view. The update is partial: omitted attributes keep their current values.

The update is partial: omitted attributes keep their current values. Private views cannot be accessed through the API and are reported as not found.


## OpenAPI

````yaml PATCH /v1/companies/views/{viewId}
openapi: 3.1.0
info:
  title: Claap API
  description: Development documentation
  version: 0.0.0
servers:
  - url: https://api.claap.io/
security:
  - ApiKey: []
paths:
  /v1/companies/views/{viewId}:
    patch:
      description: >-
        Update a company view. The update is partial: omitted attributes keep
        their current values.
      operationId: patchV1CompaniesViewsByViewId
      parameters:
        - in: path
          name: viewId
          schema:
            type: string
            description: Company view identifier
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                columns:
                  type: array
                  items:
                    $ref: '#/components/schemas/CompanyViewColumnInput'
                  description: >-
                    The columns of the companies table. When omitted, the
                    current columns are kept.
                filters:
                  $ref: '#/components/schemas/CompanyViewFilters'
                  description: >-
                    The filters applied by the view. When omitted, the current
                    filters are kept.
                icon:
                  type:
                    - string
                    - 'null'
                  description: The view icon. Set to null to remove the icon.
                name:
                  type: string
                  description: The view name.
                sort:
                  type: array
                  items:
                    $ref: '#/components/schemas/CompanyViewSortDimension'
                  description: >-
                    The sort order of the companies table. When omitted, the
                    current sort order is kept.
      responses:
        '200':
          description: Company view was successfully updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/CompanyView'
                required:
                  - result
        '404':
          description: >-
            Company view was not found. Note that private views cannot be
            accessed through the API and are reported as not found.
components:
  schemas:
    CompanyViewColumnInput:
      type: object
      properties:
        columnId:
          type: string
          enum:
            - Contacts
            - Deals
            - Domain
            - LastInteraction
            - Name
          description: The built-in column identifier.
        isHidden:
          type: boolean
          description: Whether the column is hidden in the table.
          default: false
        type:
          type: string
          enum:
            - Default
          description: The column type. Only `Default` is supported today.
          default: Default
        width:
          type: number
          description: The column width, in pixels.
      required:
        - columnId
      description: A column of the companies table.
    CompanyViewFilters:
      type: object
      properties:
        contactIdIn:
          type: array
          items:
            type: string
          description: >-
            Only include companies linked to one of these CRM contact
            identifiers.
          default: []
        contactIdNotIn:
          type: array
          items:
            type: string
          description: Exclude companies linked to one of these CRM contact identifiers.
          default: []
        dealIdIn:
          type: array
          items:
            type: string
          description: Only include companies linked to one of these deal identifiers.
          default: []
        dealIdNotIn:
          type: array
          items:
            type: string
          description: Exclude companies linked to one of these deal identifiers.
          default: []
        dealStatusIn:
          type: array
          items:
            type: string
            enum:
              - Lost
              - Open
              - Won
          description: Only include companies with a deal in one of these statuses.
          default: []
        dealStatusNotIn:
          type: array
          items:
            type: string
            enum:
              - Lost
              - Open
              - Won
          description: Exclude companies with a deal in one of these statuses.
          default: []
        hasInteraction:
          type: boolean
          description: >-
            Only include companies with (true) or without (false) at least one
            interaction.
      description: >-
        The filters applied by the view to the companies table. All set filters
        must match.
    CompanyViewSortDimension:
      type: object
      properties:
        field:
          type: string
          enum:
            - ContactName
            - CreatedAt
            - DealCreatedAt
            - DealName
            - Domain
            - LastInteraction
            - Name
          description: The field to sort companies by.
        order:
          type: string
          enum:
            - Asc
            - Desc
          description: The sort direction.
      required:
        - field
        - order
      description: A sort dimension of the companies table.
    CompanyView:
      type: object
      properties:
        viewId:
          type: string
          description: The view identifier.
        name:
          type: string
          description: The view name.
        visibility:
          type: string
          enum:
            - Public
            - Private
          description: >-
            The view visibility. Only `Public` views are accessible through the
            API.
        icon:
          type: string
          description: The view icon.
        ownerId:
          type: string
          description: Claap user identifier of the view owner.
        columns:
          type: array
          items:
            $ref: '#/components/schemas/CompanyViewColumn'
          description: The columns of the companies table.
        filters:
          $ref: '#/components/schemas/CompanyViewFilters'
        sort:
          type: array
          items:
            $ref: '#/components/schemas/CompanyViewSortDimension'
          description: The sort order of the companies table.
      required:
        - viewId
        - name
        - visibility
        - ownerId
        - columns
        - filters
        - sort
      description: A saved view of the companies table.
    CompanyViewColumn:
      type: object
      properties:
        columnId:
          type: string
          description: The built-in column identifier.
        isHidden:
          type: boolean
          description: Whether the column is hidden in the table.
          default: false
        type:
          type: string
          enum:
            - Default
          description: The column type. Only `Default` is supported today.
          default: Default
        width:
          type: number
          description: The column width, in pixels.
      required:
        - columnId
      description: A column of the companies table.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````