---
title: "/chat"
method: GET
path: "/chat"
tags: ["Chat"]
---

# /chat

`GET /chat`

## Request

- Base URL: `<<api-url>>` (relative, and the document’s source URL is not known)
- URL: `<<api-url>>/chat`
- Auth: API key in header `X-API-KEY`

Retrives all chats or filter using a search criteria

## Query parameters

- `filters` Filters[]
  - `property` string, required: Name of the property
  - `operator` 'eq' | 'ne' | 'lt' | 'gt' | 'le' | 'ge' | 'in' | 'nin', required: Comparison operator
  - `value` union, required: Name of the property
    - string
    - number
    - boolean
- `page` number
- `limit` number
- `sort` Sort
  - `property` string, required: Name of the property to sort
  - `direction` 'asc' | 'desc', required: 'asc' or 'desc' to order the result

## Headers

- `octa-agent-email` string

## Response `201`

- ChatList[]
  - `id` string, required: Your chat identification key
  - `number` string: The number to identify your chat through the application
  - `channel` 'whatsapp' | 'web' | 'facebook-messenger' | 'instagram' | 'email' | 'widget': Channel that the conversation occurred
  - `contact` ContactsPayload: Contact that started the conversation
    - `id` string: Customer ID
    - `name` string: Customer name
    - `email` string: Customer email
    - `phoneContacts` PhoneContacts[]: Phone info that will receive the message
      - `number` string, required: Phone Number that will receive the message
      - `countryCode` string: Country code
    - `customFields` CustomFields[]: Fields to be used on the template (key / value)
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
    - `organization` Organization: This field refers to the organization to which the contact belongs
      - `id` string, required: Organization ID
      - `name` string, required: Organization name
      - `customField` CustomFields[], required: Organization custom fields
        - `key` string, required: Key of the field
        - `value` union, required: Value of the field
          - string
          - number
          - boolean
    - `responsible` ResponsibleDTO: Contact's responsible
      - `id` string: Id of the responsible
      - `name` string: Name of the responsible
      - `email` string: Email of the responsible
  - `agent` User: Agent who was assigned to conversation
    - `id` string, required: Person identifier
    - `name` string, required: Person name
    - `email` string, required: Person email
    - `type` string: Person type, if is an agent or a contact
    - `phoneContacts` PhoneContacts: Person phone number
      - `number` string, required: Phone Number that will receive the message
      - `countryCode` string: Country code
    - `customFields` CustomFields: Custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
    - `organization` Organization: This field refers to the organization to which the contact belongs
      - `id` string, required: Organization ID
      - `name` string, required: Organization name
      - `customField` CustomFields[], required: Organization custom fields
        - `key` string, required: Key of the field
        - `value` union, required: Value of the field
          - string
          - number
          - boolean
  - `lastMessageDate` string, date-time: Date of the last message that was send
  - `status` 'waiting' | 'talking' | 'closed' | 'missed' | 'started' | 'offline' | 'hidden': The status of the conversation
  - `closedAt` string, date-time: Date the chat was closed
  - `group` Group: Designated group for customer service
    - `id` string, required: Group ID
    - `name` string, required: Group name
  - `tags` string[]: The tags that are marked for this conversation
  - `withBot` boolean: If a bot was involved in this conversation
  - `unreadMessages` boolean: An attribute that indicates whether there are unanswered messages
  - `createdAt` string, date-time: The date the chat was created
  - `updatedAt` string, date-time: The date the chat was last updated
  - `origin` 'outbound' | 'inbound': Person who started the conversation
  - `botName` string: Name of the bot that participated in the conversation
  - `conversationOrigin` string: Origin of the conversation
  - `statusDetail` 'in-queue' | 'in-service' | 'abandoned' | 'closed-inactivity' | 'closed-timeout' | 'closed-by-operator' | 'closed-by-customer' | 'closed-by-Bot': The status detail
  - `agentFirstMessageDate` string: Date of the first message sent by an agent
  - `botAssignedDate` string: Date when the bot assigned the chat
  - `assignedToAgentDate` string: Date when the chat was assigned to an agent
  - `assignedToGroupDate` string: Date when the chat was assigned to a group
  - `survey` Survey: The survey information
    - `response` 'satisfied' | 'unsatisfied' | 'not_answered' | 'not_sent', required: Survey answer
    - `comment` string: Survey comment
  - `bot` Bot: Bot journey data with timestamps for computing resolution and response time metrics
    - `contactStartedAt` string, date-time: Timestamp when the contact started the conversation
    - `assignedAt` string, date-time: Timestamp when the bot/flux was assigned
    - `id` string: ID of the bot/flux
    - `name` string: Name of the bot/flux
    - `woz` Woz: WOZ virtual agent data
      - `assignedAt` string, date-time: Timestamp when the WOZ virtual agent was assigned
      - `virtualAgentId` string: ID of the WOZ virtual agent
      - `virtualAgentName` string: Name of the WOZ virtual agent
      - `chargeReason` 'CLIENT_REPLY_TIMEOUT' | 'WOZ_HANDLED_CONVERSATION' | 'AGENT_REPLIED_WOZ_CONVERSATION' | 'AGENT_CLOSED_CHAT' | 'WOZ_TRANSFERRED_CONVERSATION': Reason why the WOZ virtual agent was charged for this conversation
    - `transferredToHumanAt` string, date-time: Timestamp when the conversation was transferred to a human agent
    - `firstHumanResponseAt` string, date-time: Timestamp of the first human agent response
    - `closedAt` string, date-time: Timestamp when the conversation was closed
    - `resolvedByBot` boolean: Whether the conversation was resolved by the bot/WOZ without human transfer

---

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