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

# List Views

> Lists the views of the Contacts, Companies or Tasks list, as the API key's user sees them.

> [!NOTE]
>
> This endpoint uses the [View object](https://developer.lemlist.com/api-reference/objects-definitions/view.md).


## OpenAPI

````yaml get /views
openapi: 3.0.0
info:
  title: lemlist API
  version: 1.0.0
  description: >-
    Welcome to the lemlist Developer Documentation.


    lemlist is very customizable and open. You'll find on this page all the API
    and integration you can do with lemlist.


    # Rate Limit


    lemlist's API rate limits requests in order to prevent abuse and overload of
    our services.  

    Rate limits are applied on all routes and per API key performing the
    request.  

    The rate limits are **20** requests per **2** seconds.  

    The response provides any information you may need about it:


    | Header | Description |

    | --- | --- |

    | Retry-After | The number of seconds in which you can retry |

    | X-RateLimit-Limit | The maximum requests in that time |

    | X-RateLimit-Remaining | The number of remaining requests you can make |

    | X-RateLimit-Reset | The date when the rate limit will reset |


    _Example of values for the rate limit headers_


    ``` json

    {
        "Retry-After": 2,
        "X-RateLimit-Limit": 20,
        "X-RateLimit-Remaining": 7,
        "X-RateLimit-Reset" : "Tue Feb 16 2021 09:02:42 GMT+0100 (Central European Standard Time)"
    }

     ```

    # Definitions


    ## Team


    A team is the entity of lemlist that can handle users and billing.


    ## Credits


    Credits are the coins a team uses to enrich emails, LinkedIn URLs, etc. via
    the enrich route. Each enrichment feature needs a certain amount of credits
    to run.


    ## User


    You use a user account to connect to lemlist and send messages via the
    connected emails or LinkedIn account.


    ## Campaign


    A campaign is the entity to automate outreach. A campaign has multiple
    sequences composed of steps.


    ## Lead


    A lead is a person that you try to contact via a campaign.


    ## Activity


    An activity is the history of all the steps.


    ## Unsubscribe


    An unsubscribe occurs when a person decides they don't want to receive
    emails from you anymore.


    # Authentication


    All API routes use the dedicated subdomain `api.lemlist.com`.


    lemlist uses API keys to allow access to the API. You can get your lemlist
    API key at our [integration
    page](https://app.lemlist.com/settings/integrations).


    You need to add the `Authorization` header using the `Basic` authentication
    type. `login:password` **where the login is always empty and the password is
    the API key**.


    ⚠️ **Don't forget to add the semicolon (**`:`**) before your API key in curl
    command.**


    > To authorize, use this code: 
      

    ``` shell

    curl https://api.lemlist.com/api/team \
      --user ":YourApiKey"

     ```

    **Make sure to replace** **`YourApiKey`** **with your API key.**


    # Give feedback


    If you want to report a bug, ask for data, or share with us a use case,
    please fill this [form](https://lemlist.typeform.com/to/mfVlkyGf). It will
    help us centralize your needs!
servers:
  - url: https://api.lemlist.com/api
security:
  - basicAuth: []
tags:
  - name: Enrichment Providers
    description: >-
      The data providers lemlist can call to find an email or a phone.


      Internal providers are paid with lemlist credits and always available.
      External providers run on your own account: connect one by saving its API
      key, and it becomes available to your waterfalls. `GET
      /enrichments/providers` is the catalog of provider ids accepted by the
      waterfall endpoints.
  - name: Enrichment Waterfalls
    description: >-
      Control which data providers lemlist calls when enriching a contact, and
      in which order.


      A waterfall is an ordered list of providers for one enrichment `type`
      (`email` or `phone`). Providers are tried one after the other until one
      returns a result.


      Every team has exactly one default waterfall per type (`isDefault: true`).
      While its `editor` is `lemlist` it follows the lemlist behaviour:
      providers you connected with your own API key are tried first, then
      internal providers in a random order. Once a team member edits its
      provider list, `editor` becomes that user's id and the list is followed as
      is; resetting it hands it back to `lemlist`.


      Custom waterfalls (`isDefault: false`) carry `conditions` on the contact
      being enriched, keyed by contact property; every key present must match.
      When a contact is enriched, lemlist runs a single waterfall: the custom
      waterfall of the requested type whose conditions match the contact, or the
      default waterfall when none does. If several match, the one with the most
      condition keys wins, then the most recently updated. Only that waterfall
      runs; when it finds nothing, the enrichment ends without falling back to
      another one.
paths:
  /views:
    get:
      tags:
        - Views
      summary: List Views
      description: >-
        Lists the views of one list (the Contacts, Companies or Tasks page) as
        the API key's user sees them, in tab order: the lemlist default views,
        the views shared with the team and the user's private views. `pinned`
        flags the ones shown as tabs.


        Each view carries its filters as the page saved them, plus a `url` that
        opens the page on that view.
      operationId: listViews
      parameters:
        - name: entity
          in: query
          required: true
          description: >-
            The list: `contact` (Contacts page), `company` (Companies page) or
            `task` (Tasks page)
          schema:
            $ref: '#/components/schemas/ViewEntity'
          example: contact
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - views
                    properties:
                      views:
                        type: array
                        items:
                          $ref: '#/components/schemas/View'
              example:
                data:
                  views:
                    - id: evw_contact_my_contacts
                      name: My contacts
                      icon: far fa-folder
                      visibility: everyone
                      isDefault: true
                      canEdit: false
                      pinned: true
                      filterState:
                        basicFilters:
                          - type: condition
                            id: ownerId
                            property: ownerId
                            operator: is_any_of
                            value:
                              - __me__
                        advancedFilters: []
                        rootConnector: and
                      sort:
                        field: createdAt
                        order: -1
                      url: >-
                        https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_contact_my_contacts
                    - id: evw_A1B2C3ExAmPlE9xYz
                      name: Hot leads in Paris
                      icon: far fa-fire
                      visibility: me
                      isDefault: false
                      canEdit: true
                      pinned: true
                      filterState:
                        basicFilters:
                          - type: condition
                            id: ExAmPlE1A2B3C4D5E
                            property: ownerId
                            operator: is_any_of
                            value:
                              - __me__
                          - type: condition
                            id: FakeA1B2C3D4E5F6G
                            property: location
                            operator: contains
                            value: Paris
                        advancedFilters: []
                      url: >-
                        https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_A1B2C3ExAmPlE9xYz
        '400':
          description: Missing or unknown `entity`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewError'
              example:
                error: Validation error
                code: VALIDATION_ERROR
        '401':
          description: >-
            Unauthorized - invalid or missing API key. An API key with no user
            attached answers `{ "error": "Route unauthorized", "code":
            "ROUTE_UNAUTHORIZED" }` in JSON instead.
          content:
            text/plain:
              example: The authentication you supplied is incorrect
        '403':
          description: That list's views are not enabled for your team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewError'
              example:
                error: Views of this list are not enabled for this team
                code: ENTITY_VIEW_ENTITY_UNAVAILABLE
components:
  schemas:
    ViewEntity:
      type: string
      enum:
        - contact
        - company
        - task
      description: >-
        The list a view belongs to: `contact` (Contacts page), `company`
        (Companies page) or `task` (Tasks page)
      example: contact
    View:
      type: object
      description: >-
        A saved view of the Contacts, Companies or Tasks list: a named set of
        filters, shown as a tab.
      required:
        - id
        - name
        - visibility
        - isDefault
        - canEdit
        - pinned
        - filterState
        - url
      properties:
        id:
          type: string
          description: View id
          example: evw_A1B2C3ExAmPlE9xYz
        name:
          type: string
          description: Name shown on the tab
          example: Hot leads in Paris
        icon:
          type: string
          description: Font Awesome icon shown on the tab
          example: far fa-fire
        visibility:
          $ref: '#/components/schemas/ViewVisibility'
        isDefault:
          type: boolean
          description: >-
            A lemlist default view, read-only: it can be pinned, hidden or
            duplicated
        canEdit:
          type: boolean
          description: Whether the API key's user may edit or delete it
        pinned:
          type: boolean
          description: Shown as one of the user's tabs
        filterState:
          type: object
          description: >-
            The filters as the page saved them. `basicFilters` are AND-ed
            conditions; `advancedFilters` is a tree of conditions and groups
            combined by `rootConnector`.
          properties:
            basicFilters:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - condition
                      - group
                    description: A condition or a group of nodes
                  id:
                    type: string
                    description: Node id, unique within the view
                  property:
                    type: string
                    description: 'Condition only: the field id, see `ViewField.id`'
                  operator:
                    type: string
                    enum:
                      - contains
                      - does_not_contain
                      - is
                      - is_not
                      - starts_with
                      - ends_with
                      - is_empty
                      - is_not_empty
                      - eq
                      - neq
                      - gt
                      - lt
                      - gte
                      - lte
                      - is_between
                      - is_before
                      - is_after
                      - is_on_or_before
                      - is_on_or_after
                      - is_relative
                      - is_any_of
                      - is_none_of
                      - contains_any_of
                      - contains_all_of
                      - is_true
                      - is_false
                      - is_not_true
                      - is_not_false
                    description: Condition only
                  value:
                    description: >-
                      Condition only: the value, shaped as in
                      `ViewCondition.value`
                  connector:
                    type: string
                    enum:
                      - and
                      - or
                    description: 'Group only: how its children combine'
                  children:
                    type: array
                    description: 'Group only: its nodes, of this same shape'
                    items:
                      type: object
            advancedFilters:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - condition
                      - group
                    description: A condition or a group of nodes
                  id:
                    type: string
                    description: Node id, unique within the view
                  property:
                    type: string
                    description: 'Condition only: the field id, see `ViewField.id`'
                  operator:
                    type: string
                    enum:
                      - contains
                      - does_not_contain
                      - is
                      - is_not
                      - starts_with
                      - ends_with
                      - is_empty
                      - is_not_empty
                      - eq
                      - neq
                      - gt
                      - lt
                      - gte
                      - lte
                      - is_between
                      - is_before
                      - is_after
                      - is_on_or_before
                      - is_on_or_after
                      - is_relative
                      - is_any_of
                      - is_none_of
                      - contains_any_of
                      - contains_all_of
                      - is_true
                      - is_false
                      - is_not_true
                      - is_not_false
                    description: Condition only
                  value:
                    description: >-
                      Condition only: the value, shaped as in
                      `ViewCondition.value`
                  connector:
                    type: string
                    enum:
                      - and
                      - or
                    description: 'Group only: how its children combine'
                  children:
                    type: array
                    description: 'Group only: its nodes, of this same shape'
                    items:
                      type: object
            rootConnector:
              type: string
              enum:
                - and
                - or
        sort:
          type: object
          description: >-
            The sort saved in lemlist, absent when the view uses the page
            default
          properties:
            field:
              type: string
              example: createdAt
            order:
              type: integer
              enum:
                - 1
                - -1
              description: '`1` ascending, `-1` descending'
        columns:
          type: array
          description: >-
            The visible columns saved in lemlist, in order; absent when the view
            follows the user's columns
          items:
            type: object
            properties:
              field:
                type: string
              locked:
                type: boolean
                description: Pinned to the left of the table
        url:
          type: string
          description: Opens the list on that view in lemlist
          example: >-
            https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_A1B2C3ExAmPlE9xYz
    ViewError:
      type: object
      description: Error envelope returned by the views endpoints.
      properties:
        error:
          type: string
          description: Human-readable explanation of the failure
        code:
          type: string
          description: Machine-readable error code, stable across releases
    ViewVisibility:
      type: string
      enum:
        - me
        - everyone
      description: >-
        `me`: private to its owner. `everyone`: shared with the team, which
        needs the "Create views for the team" permission. Defaults to `me` on
        create.
      example: me
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

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