---
title: "List views"
method: GET
path: "/api/views"
tags: ["Views"]
---

# List views

`GET /api/views`

List all views ordered by their `id` attribute. Current user variables (`{{current_user...}}`) present in views' filters will be replaced with the information of the user listing views.

## Query parameters

- `order_by` 'created_datetime:asc' | 'created_datetime:desc'
- `cursor` string
- `limit` integer
- `category` 'system' | 'user'

## Response `200`

A list of views.

- object
  - `object` string, required
  - `uri` string, required
  - `data` View[], required
    - `id` integer, required — ID of the view.
    - `category` string — Category is an internal, read-only field used to identify system and user views.Example of system views: Trash or Spam. System views cannot be deleted.
    - `created_datetime` string, date-time — When the view was created.
    - `deactivated_datetime` string, date-time — When the view was deactivated.
    - `decoration` ViewDecoration
      - `emoji` string — Emoji displayed before the view's name.
    - `fields` ViewField[] — List of object's attributes to be displayed in the UI of our applications.
    - `filters` string — The logic used to filter the items to be displayed in the view (as JavaScript code).
    - `name` string — The name of the view.
    - `order_by` string — Name of the object's attribute used to sort the items of the view.
    - `order_dir` 'asc' | 'desc' — Sort direction of the items displayed in the view. Options: `asc` or `desc`.
    - `search` string — Text used to search for items matching the query.
    - `shared_with_teams` ViewSharedWithTeam[] — Teams this view is shared with.
      - `id` integer, required — ID of the team.
      - `name` string, required — Name of the team.
      - `decoration` object — Object describing how the team appears on the webpage. Currently only supports `emoji` field that shows before the team's name.
    - `shared_with_users` ViewSharedWithUser[] — Users this view is shared with.
      - `id` integer, required — ID of the user.
      - `name` string, required — Name of the user.
      - `meta` object — User defined JSON field with additional info about the user.
    - `slug` string — DEPRECATED - URL-compatible name of the view.
    - `type` 'ticket-list' | 'customer-list'
    - `uri` string, required — URI of the object (auto-generated)
    - `visibility` 'public' | 'shared' | 'private'
  - `meta` CursorPaginationMeta, required
    - `prev_cursor` string, required
    - `next_cursor` string, required
    - `total_resources` integer, required

---

[API](https://skmtc.net/gorgias/apis/gorgias-rest-api.md) · [All operations](https://skmtc.net/gorgias/apis/gorgias-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gorgias/gorgias-rest-api/versions/36f2e31f4e81/schema)
