---
title: "Retrieves all saved Chats"
method: POST
path: "/rest/api/v1/listchats"
tags: ["Chat"]
---

# Retrieves all saved Chats

`POST /rest/api/v1/listchats`

Retrieves all the saved Chats between Glean Assistant and the user. The returned Chats contain only metadata and no conversational content.

## Query parameters

- `locale` string
- `timezoneOffset` integer

## Response `200`

OK

- ListChatsResponse
  - `chatResults` ChatMetadataResult[]
    - `chat` ChatMetadata — Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content.
      - `id` string — The opaque id of the Chat.
      - `createTime` integer — Server Unix timestamp of the creation time (in seconds since epoch UTC).
      - `createdBy` Person
        - `name` string, required — The display name.
        - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
        - `relatedDocuments` RelatedDocuments[] — A list of documents related to this person.
          - `relation` 'ATTACHMENT' | 'CANONICAL' | 'CASE' | 'contact' | 'CONTACT' | 'CONVERSATION_MESSAGES' | 'EXPERT' | 'FROM' | 'HIGHLIGHT' | 'opportunity' | 'OPPORTUNITY' | 'RECENT' | 'SOURCE' | 'TICKET' | 'TRANSCRIPT' | 'WITH' — How this document relates to the including entity.
          - `associatedEntityId` string — Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers)
          - `querySuggestion` QuerySuggestion
            - `missingTerm` string — A query term missing from the original query on which this suggestion is based.
            - `query` string, required — The query being suggested (e.g. enforcing the missing term from the original query).
            - `searchProviderInfo` SearchProviderInfo
              - …
            - `label` string — A user-facing description to display for the suggestion.
            - `datasource` string — The datasource associated with the suggestion.
            - `resultTab` ResultTab
              - …
            - `requestOptions` SearchRequestOptions
              - …
            - `ranges` TextRange[] — The bolded ranges within the query of the QuerySuggestion.
              - …
            - `inputDetails` SearchRequestInputDetails
              - …
          - `documents` Document[] — A truncated list of documents with this relation. TO BE DEPRECATED.
            - `id` string — The Glean Document ID.
            - `datasource` string — The app or other repository type from which the document was extracted
            - `connectorType` 'API_CRAWL' | 'BROWSER_CRAWL' | 'BROWSER_HISTORY' | 'BUILTIN' | 'FEDERATED_SEARCH' | 'PUSH_API' | 'WEB_CRAWL' | 'NATIVE_HISTORY' — The source from which document content was pulled, e.g. an API crawl or browser history
            - `docType` string — The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
            - `content` DocumentContent
              - …
            - `containerDocument` Document — recursive
            - `parentDocument` Document — recursive
            - `title` string — The title of the document.
            - `url` string — A permalink for the document.
            - `metadata` DocumentMetadata
              - …
            - `sections` DocumentSection[] — A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.
              - …
          - `results` SearchResult[] — A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken.
            - `structuredResults` StructuredResult[] — An array of entities in the work graph retrieved via a data request.
              - …
            - `trackingToken` string — An opaque token that represents this particular result in this particular query. To be used for /feedback reporting.
            - `document` Document
              - …
            - `title` string
            - `url` string, required
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...).
            - `snippets` SearchResultSnippet[] — Text content from the result document which contains search query terms, if available.
              - …
            - `fullText` string — The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `fullTextList` string[] — The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `relatedResults` RelatedDocuments[] — A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP.
            - `clusteredResults` SearchResult[] — A list of results that should be displayed as associated with this result.
            - `allClusteredResults` ClusterGroup[] — A list of results that should be displayed as associated with this result.
              - …
            - `attachmentCount` integer — The total number of attachments.
            - `attachments` SearchResult[] — A (potentially partial) list of results representing documents attached to the main result document.
            - `backlinkResults` SearchResult[] — A list of results that should be displayed as backlinks of this result in reverse chronological order.
            - `clusterType` 'SIMILAR' | 'FRESHNESS' | 'TITLE' | 'CONTENT' | 'NONE' | 'THREAD_REPLY' | 'THREAD_ROOT' | 'PREFIX' | 'SUFFIX' | 'AUTHOR_PREFIX' | 'AUTHOR_SUFFIX' — The reason for inclusion of clusteredResults.
            - `mustIncludeSuggestions` QuerySuggestionList
              - …
            - `querySuggestion` QuerySuggestion
              - …
            - `prominence` 'HERO' | 'PROMOTED' | 'STANDARD' — The level of visual distinction that should be given to a result.
            - `attachmentContext` string — Additional context for the relationship between the result and the document it's attached to.
            - `pins` PinDocument[] — A list of pins associated with this search result.
              - …
        - `metadata` PersonMetadata
          - `type` 'FULL_TIME' | 'CONTRACTOR' | 'NON_EMPLOYEE' | 'FORMER_EMPLOYEE'
          - `firstName` string — The first name of the person
          - `lastName` string — The last name of the person
          - `title` string — Job title.
          - `businessUnit` string — Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses.
          - `department` string — An organizational unit where everyone has a similar task, e.g. `Engineering`.
          - `jobFunction` string — Normalized job-function category assigned by Entity Builder from the source department and, when available, job title. Unlike `department`, which preserves the company-specific organizational unit, this field groups departments into configured categories such as `Engineering`, `Sales`, or `IT`; it may be `Unknown` when the mapping is inconclusive.
          - `teams` PersonTeam[] — Info about the employee's team(s).
            - `id` string — Unique identifier
            - `name` string — Team name
            - `externalLink` string, uri — Link to a team page on the internet or your company's intranet
            - `relationship` 'MEMBER' | 'MANAGER' | 'LEAD' | 'POINT_OF_CONTACT' | 'OTHER' — The team member's relationship to the team. This defaults to MEMBER if not set.
            - `joinDate` string, date-time — The team member's start date
          - `departmentCount` integer — The number of people in this person's department.
          - `email` string — The user's primary email address
          - `aliasEmails` string[] — Additional email addresses of this user beyond the primary, if any.
          - `location` string — User facing string representing the person's location.
          - `structuredLocation` StructuredLocation — Detailed location with information about country, state, city etc.
            - `deskLocation` string — Desk number.
            - `timezone` string — Location's timezone, e.g. UTC, PST.
            - `address` string — Office address or name.
            - `city` string — Name of the city.
            - `state` string — State code.
            - `region` string — Region information, e.g. NORAM, APAC.
            - `zipCode` string — ZIP Code for the address.
            - `country` string — Country name.
            - `countryCode` string — Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA.
          - `externalProfileLink` string — Link to a customer's internal profile page. This is set to '#' when no link is desired.
          - `manager` Person — recursive
          - `managementChain` Person[] — The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager.
          - `phone` string — Phone number as a number string.
          - `timezone` string — The timezone of the person. E.g. "Pacific Daylight Time".
          - `timezoneOffset` integer — The offset of the person's timezone in seconds from UTC.
          - `timezoneIANA` string — The IANA timezone identifier, e.g. "America/Los_Angeles".
          - `photoUrl` string, url — The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs).
          - `uneditedPhotoUrl` string, url — The original photo URL of the person's avatar before any edits they made are applied
          - `bannerUrl` string, url — The URL of the person's banner photo.
          - `reports` Person[]
          - `startDate` string, date — The date when the employee started.
          - `endDate` string, date — If a former employee, the last date of employment.
          - `bio` string — Short biography or mission statement of the employee.
          - `pronoun` string — She/her, He/his or other pronoun.
          - `orgSizeCount` integer — The total recursive size of the people reporting to this person, or 1
          - `directReportsCount` integer — The total number of people who directly report to this person, or 0
          - `preferredName` string — The preferred name of the person, or a nickname.
          - `socialNetwork` SocialNetwork[] — List of social network profiles.
            - `name` string, required — Possible values are "twitter", "linkedin".
            - `profileName` string — Human-readable profile name.
            - `profileUrl` string, url, required — Link to profile.
          - `datasourceProfile` DatasourceProfile[] — List of profiles this user has in different datasources / tools that they use.
            - `datasource` string, required — The datasource the profile is of.
            - `handle` string, required — The display name of the entity in the given datasource.
            - `url` string — URL to view the entity's profile.
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...).
            - `isUserGenerated` boolean — For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source)
          - `querySuggestions` QuerySuggestionList
            - `suggestions` QuerySuggestion[]
              - …
            - `person` Person — recursive
          - `peopleDistance` PersonDistance[] — List of people and distances to those people from this person. Optionally with metadata.
            - `name` string, required — The display name.
            - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
            - `distance` number, float, required — Distance to person, refer to PeopleDistance pipeline on interpretation of the value.
          - `inviteInfo` InviteInfo — Information regarding the invite status of a person.
            - `signUpTime` string, date-time — The time this person signed up in ISO format (ISO 8601).
            - `invites` ChannelInviteInfo[] — Latest invites received by the user for each channel
              - …
            - `inviter` Person — recursive
            - `inviteTime` string, date-time — The time this person was invited in ISO format (ISO 8601).
            - `reminderTime` string, date-time — The time this person was reminded in ISO format (ISO 8601) if a reminder was sent.
          - `isSignedUp` boolean — Whether the user has signed into Glean at least once.
          - `lastExtensionUse` string, date-time — The last time the user has used the Glean extension in ISO 8601 format.
          - `permissions` Permissions — Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes.
            - `canAdminSearch` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch
            - `canAdminClientApiGlobalTokens` boolean — TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope
            - `canDlp` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features
            - `read` unknown
            - `write` unknown
            - `grant` unknown
            - `role` string — The roleId of the canonical role a user has. The displayName is equal to the roleId.
            - `roles` string[] — The roleIds of the roles a user has.
          - `customFields` CustomFieldData[] — User customizable fields for additional people information.
            - `label` string, required — A user-facing label for this field.
            - `values` CustomFieldValue[], required
              - …
            - `displayable` boolean, required — Determines whether the client should display this custom field
          - `loggingId` string — The logging id of the person used in scrubbed logs, tracking GA metrics.
          - `startDatePercentile` number, float — Percentage of the company that started strictly after this person. Between [0,100).
          - `busyEvents` AnonymousEvent[] — Intervals of busy time for this person, along with the type of event they're busy with.
            - `time` TimeInterval
              - …
            - `eventType` 'DEFAULT' | 'OUT_OF_OFFICE' — The nature of the event, for example "out of office".
          - `profileBoolSettings` object — flag settings to indicate user profile settings for certain items
          - `badges` Badge[] — The badges that a user has earned over their lifetime.
            - `key` string — An auto generated unique identifier.
            - `displayName` string — The badge name displayed to users
            - `iconConfig` IconConfig — Defines how to render an icon
              - …
            - `pinned` boolean — The badge should be shown on the PersonAttribution
          - `isOrgRoot` boolean — Whether this person is a "root" node in their organization's hierarchy.
      - `updateTime` integer — Server Unix timestamp of the update time (in seconds since epoch UTC).
      - `name` string — The name of the Chat.
      - `applicationId` string — The ID of the AI App that this Chat is associated to.
      - `applicationName` string — The display name of the AI App that this Chat is associated to.
      - `icon` IconConfig — Defines how to render an icon
        - `generatedBackgroundColorKey` string
        - `backgroundColor` string
        - `color` string
        - `key` string
        - `iconType` 'COLLECTION' | 'CUSTOM' | 'DATASOURCE' | 'DATASOURCE_INSTANCE' | 'FAVICON' | 'FILE_TYPE' | 'GENERATED_BACKGROUND' | 'GLYPH' | 'MIME_TYPE' | 'NO_ICON' | 'PERSON' | 'REACTIONS' | 'URL'
        - `masked` boolean — Whether the icon should be masked based on current theme.
        - `name` string — The name of the icon if applicable, e.g. the glyph name for `IconType.GLYPH` icons.
        - `url` string — The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons.
    - `trackingToken` string — An opaque token that represents this particular Chat. To be used for `/feedback` reporting.
  - `cursor` string — An opaque cursor for fetching the next page of results. If empty, there are no more results.

## Other responses

- `401` — Not Authorized
- `403` — Forbidden
- `429` — Too Many Requests

---

[API](https://skmtc.net/gleanwork/apis/glean-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-api/revisions/ebd602e4aea4/schema)
