---
title: "Lists all chat histories"
method: GET
path: "/v1/chat/widget/histories"
tags: ["Chat"]
---

# Lists all chat histories

`GET /v1/chat/widget/histories`

## Request

- Base URL: `https://api.infoset.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infoset.app/v1/chat/widget/histories`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/infoset/apis/infoset-rest-api/docs/v1/chat/widget/histories/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `ApiKey` string
- `VisitorId` string
- `Email` string
- `Phone` string
- `UserHash` string
- `RoomTokens` string
- `Channel` 1 | 2 | 3 | 4 | 5 | 8 | 10 | 11 | 13 | 14 | 15 | 16: <p>Enum values:</p><ul><li><i>1 = Chat</i></li><li><i>2 = WhatsApp</i></li><li><i>3 = Facebook</i></li><li><i>4 = Twitter</i></li><li><i>5 = Instagram</i></li><li><i>8 = Telegram</i></li><li><i>10 = Email</i></li><li><i>11 = Sms</i></li><li><i>13 = GooglePlay</i></li><li><i>14 = AppStore</i></li><li><i>15 = Trendyol</i></li><li><i>16 = Tescom</i></li></ul>
- `ViewType` 0 | 1: <p>Enum values:</p><ul><li><i>0 = List</i></li><li><i>1 = Kanban</i></li></ul>
- `Page` integer
- `ItemsPerPage` integer
- `ReturnTotalItems` boolean

## Response `200`

OK

- ChatHistoryResponseQueryResult
  - `totalItems` integer
  - `items` ChatHistoryResponse[], nullable
    - `statusCode` integer, nullable
    - `success` boolean
    - `message` string, nullable
    - `resource` ChatMessageItem
      - `id` string, nullable
      - `departmentId` integer
      - `chatId` integer
      - `roomId` integer
      - `channel` 1 | 2 | 3 | 4 | 5 | 8 | 10 | 11 | 13 | 14 | 15 | 16: <p>Enum values:</p><ul><li><i>1 = Chat</i></li><li><i>2 = WhatsApp</i></li><li><i>3 = Facebook</i></li><li><i>4 = Twitter</i></li><li><i>5 = Instagram</i></li><li><i>8 = Telegram</i></li><li><i>10 = Email</i></li><li><i>11 = Sms</i></li><li><i>13 = GooglePlay</i></li><li><i>14 = AppStore</i></li><li><i>15 = Trendyol</i></li><li><i>16 = Tescom</i></li></ul>
      - `channelName` string, nullable
      - `channelId` integer, nullable
      - `channelData` string, nullable
      - `externalId` string, nullable
      - `isFromAgent` integer: 0:visitor, 1:agent, 2:chatbot 4:gen-ai (see ChatUserType.GenAi; 3 is skipped, it is ChatClosedActorType.System)
      - `aiSourceType` integer, nullable: Provenance of the message text (`AiSourceType`), or `null` for "never evaluated by the AI pipeline" — every human and RiveScript message. Independent of Infoset.Types.Models.Items.Chat.ChatMessageItem.IsFromAgent: neither substitutes for the other.
      - `fromUser` string, nullable: Message sender
      - `visitor` string, nullable
      - `agent` string, nullable
      - `photo` string, nullable
      - `content` string, nullable
      - `fileUrls` string, nullable
      - `sourceLang` string, nullable
      - `targetLang` string, nullable
      - `logTime` string, date-time
      - `isNote` integer: 1: mention, 0: chat message
      - `isEdited` integer
      - `isDeleted` integer
      - `readAt` string, date-time, nullable
      - `replyToId` string, nullable
      - `reaction` string, nullable: Stored separately so a reaction does not masquerade as an edited or additional message.
      - `failedReason` string, nullable
      - `failedCategory` string, nullable
      - `mentionedUserIds` string, nullable
      - `isTranslated` integer
      - `translatedContent` string, nullable
      - `contactId` integer
      - `companyId` integer, nullable
      - `assignedTo` integer
      - `status` string, nullable
      - `roomStatus` string, nullable

## Other responses

- `400`: Bad Request

## Changes

- **2026-10-02** `709c8123f593`: 1 info
  - added the new optional `query` request parameter `RoomTokens`

[Operation history](https://skmtc.dev/infoset/apis/infoset-rest-api/changes/v1/chat/widget/histories/get.md)

---

[API](https://skmtc.dev/infoset/apis/infoset-rest-api.md) - [All operations](https://skmtc.dev/infoset/apis/infoset-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infoset/apis/infoset-rest-api/revisions/709c8123f593?raw)
