List Views

Lists the custom, user-defined Views of an Inbox, along with their conversation counts.

Only the Views the requesting User can see are returned: Views visible to everyone, Views the User created, and Views shared directly with the User or with one of their Teams.

The built-in Views (Unassigned, Mine, Closed, Team Views and so on) are Inbox folders and are not listed here. Legacy Views generated by workflows (also known as smart folders) are not supported and are never returned.

To list the conversations in a View, pass its id as viewId to List Conversations (v3).

Request

GET /v2/mailboxes/1/views HTTP/1.1
Authorization: Bearer oauth_token

Path Parameters

/v2/mailboxes/{mailboxId}/views

URL Parameters

Parameter Type Examples Description
page number page=1
Page number
favorite boolean favorite=true
Returns only the views marked as favorite by the requesting user

Response

HTTP/1.1 200 OK
Content-Type: application/hal+json

{
  "_embedded" : {
    "views" : [ {
      "id" : "550e8400-e29b-41d4-a716-446655440000",
      "name" : "Unanswered VIPs",
      "createdBy" : 2,
      "visibility" : {
        "type" : "public"
      },
      "favorite" : false,
      "activeCount" : 5
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "..."
    },
    "first" : {
      "href" : "..."
    },
    "last" : {
      "href" : "..."
    },
    "page" : {
      "href" : "...",
      "templated" : true
    }
  },
  "page" : {
    "number" : 1,
    "size" : 50,
    "totalElements" : 1,
    "totalPages" : 1
  }
}

Response fields

Path Type Description
_embedded.views Array List of Views

Response fields

Path Type Description
id String Unique identifier, a UUID
name String View name
createdBy Number ID of the User who created the View
favorite Boolean Whether the requesting User marked this View as favorite
activeCount Number Number of active conversations matching this View
visibility.type String Who can see this View:
custom
private
public
visibility.limitedTo Array User and Team IDs the View is visible to, besides its creator. Only present when visibility.type is custom