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

# Create contact view

> Create a contact view. The view is public and owned by the workspace member identified by `creatorEmail`.

Creates a contact view. `creatorEmail` must belong to an active workspace member, who becomes the view owner. Only public views can be created through the API.


## OpenAPI

````yaml POST /v1/contacts/views
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/contacts/views:
    post:
      description: >-
        Create a contact view. The view is public and owned by the workspace
        member identified by `creatorEmail`.
      operationId: postV1ContactsViews
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                columns:
                  type: array
                  items:
                    $ref: '#/components/schemas/ContactViewColumnInput'
                  description: >-
                    The columns of the contacts table. When omitted, the default
                    columns are used.
                filters:
                  $ref: '#/components/schemas/ContactViewFilters'
                  description: >-
                    The filters applied by the view. When omitted, the view
                    matches all contacts.
                icon:
                  type: string
                  description: The view icon.
                name:
                  type: string
                  description: The view name.
                sort:
                  type: array
                  items:
                    $ref: '#/components/schemas/ContactViewSortDimension'
                  description: >-
                    The sort order of the contacts table. When omitted, the
                    default sort order is used.
                visibility:
                  type: string
                  enum:
                    - Public
                  description: >-
                    The view visibility. Only `Public` views can be created
                    through the API.
                  default: Public
                creatorEmail:
                  type: string
                  format: email
                  description: >-
                    Email address of the view creator. It must belong to an
                    active workspace member, who becomes the view owner.
              required:
                - name
                - creatorEmail
      responses:
        '200':
          description: Contact view was successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/ContactView'
                required:
                  - result
components:
  schemas:
    ContactViewColumnInput:
      type: object
      properties:
        columnId:
          type: string
          enum:
            - Company
            - Email
            - LastInteraction
            - Name
            - Summary
          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 contacts table.
    ContactViewFilters:
      type: object
      properties:
        companyIdIn:
          type: array
          items:
            type: string
          description: >-
            Only include contacts linked to one of these CRM company
            identifiers.
          default: []
        companyIdNotIn:
          type: array
          items:
            type: string
          description: Exclude contacts linked to one of these CRM company identifiers.
          default: []
        externalities:
          type: array
          items:
            type: string
            enum:
              - External
              - Internal
          description: >-
            Only include contacts matching one of these externalities.
            `External` matches contacts outside the workspace domain, `Internal`
            matches contacts within it.
          default: []
      description: >-
        The filters applied by the view to the contacts table. All set filters
        must match.
    ContactViewSortDimension:
      type: object
      properties:
        field:
          type: string
          enum:
            - Name
            - Email
            - Company
            - LastInteraction
          description: The field to sort contacts by.
        order:
          type: string
          enum:
            - Asc
            - Desc
          description: The sort direction.
      required:
        - field
        - order
      description: A sort dimension of the contacts table.
    ContactView:
      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/ContactViewColumn'
          description: The columns of the contacts table.
        filters:
          $ref: '#/components/schemas/ContactViewFilters'
        sort:
          type: array
          items:
            $ref: '#/components/schemas/ContactViewSortDimension'
          description: The sort order of the contacts table.
      required:
        - viewId
        - name
        - visibility
        - ownerId
        - columns
        - filters
        - sort
      description: A saved view of the contacts table.
    ContactViewColumn:
      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 contacts table.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````