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

# /chat/{id}

`GET /chat/{id}`

## Request

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

Retrives information about a specific chat

## Path parameters

- `id` string, required

## Query parameters

- `page` number
- `limit` number
- `property` string, required
- `direction` 'asc' | 'desc', required

## Headers

- `octa-agent-email` string

## Response `201`

- Chat
  - `id` string, required: Your chat identification key
  - `number` string: The number to identify your chat through the application
  - `createdAt` string, date-time: The date that the chat was open
  - `updatedAt` string, date-time: The day that the chat was last updated
  - `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
  - `pastAgents` User[]: Agents that participated in the 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
  - `agent` User: Current agent of the 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
  - `messages` Message[]: First 100 messages that occurred on this conversation
    - `id` string, required: Message identifier
    - `chatId` string, required: Chat identifier
    - `time` string, date-time, required: Message sending date
    - `type` 'public' | 'internal', required: Indicate whether the message is intended for internal or public communication
    - `body` string, required: Message content
    - `readAt` string, date-time: Date the message was read
    - `attachments` Attachment[]: Attachments included in the message
      - `id` string, required: The attachment id
      - `name` string: Name of the attachment sent
      - `url` string: Attachment link in Octadesk files
    - `sentBy` User, required: Information about who sent the message
      - `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
    - `status` 'sending' | 'sended' | 'received' | 'read' | 'error' | 'deleted' | 'scheduled' | 'spam', required: Message status
    - `mentions` User[]: Mentions made in the message
      - `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
    - `quoted` object: Message that was quoted
    - `externalLink` string: External links sent in the message
    - `errorSource` string: Source of the error (e.g. "meta", "platform") when status is "error"
    - `errorCode` string: Error code returned by the provider (e.g. Meta/WhatsApp) when status is "error"
    - `errorMessage` string: Detailed error message from the provider when status is "error"
  - `lastMessageDate` string, date-time: Date of the last message that was send
  - `firstMessageDate` string, date-time: Date of the first message that was send
  - `messagesCount` number: Total number of messages exchanged
  - `status` 'waiting' | 'talking' | 'closed' | 'missed' | 'started' | 'offline' | 'hidden': The status of the conversation
  - `closed` Closed: Information about the person who closed the chat and its closing time
    - `closedBy` User: Person who closed the chat
      - `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
    - `closedAt` string, date-time: Date the chat was closed
  - `waitingTime` number: Waiting time on seconds
  - `origin` string: The origin of the beginning of the conversation
  - `botName` string: Name of the bot that participated in the conversation
  - `conversationOrigin` string: Origin of the conversation
  - `group` Group: Designated group for customer service
    - `id` string, required: Group ID
    - `name` string, required: Group name
  - `tags` Tag[]: The tags that are marked for this conversation
    - `id` string, required: Tag ID
    - `name` string: Tag name assigned in the chat
  - `windowExpiresAt` string, date-time
  - `withBot` boolean: If a bot was involved in this conversation
  - `unreadMessages` boolean: An attribute that indicates whether there are unanswered messages
  - `survey` Survey: The survey information
    - `response` 'satisfied' | 'unsatisfied' | 'not_answered' | 'not_sent', required: Survey answer
    - `comment` string: Survey comment
  - `customFields` object[]: Custom fields associated with the chat
  - `page` number: Current page number
  - `pages` number: Total number of pages for messages

---

[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)
