> ## Documentation Index
> Fetch the complete documentation index at: https://docs.periskope.app/llms.txt
> Use this file to discover all available pages before exploring further.

# The Chat Object

> The Chat object represents a chat in WhatsApp.

<ResponseExample>
  ```json The Chat Object theme={null}
  {
      "org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
      "chat_id": "919537851844@c.us",
      "members": {
          "918527184400@c.us": {
              "org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
              "chat_id": "919537851844@c.us",
              "is_admin": true,
              "org_phone": "918527184400@c.us",
              "contact_id": "918527184400@c.us",
              "is_internal": true,
              "contact_name": "Support",
              "contact_color": "#B4876E",
              "contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us.jpg?timestamp=1737690126280",
              "is_super_admin": true
          },
          "919537851844@c.us": {
              "org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
              "chat_id": "919537851844@c.us",
              "is_admin": true,
              "org_phone": "918527184400@c.us",
              "contact_id": "919537851844@c.us",
              "is_internal": false,
              "contact_name": "BK Local1",
              "contact_color": "#B4876E",
              "contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
              "is_super_admin": true
          }
      },
      "is_muted": false,
      "chat_name": "BK Local1",
      "chat_type": "user",
      "closed_at": null,
      "is_exited": false,
      "label_ids": {
          "label-xbitdvipqshahdcu": true,
          "label-xgargwpbzidjpapt": true
      },
      "labels": ["label1", "label2"]
      "org_phone": "918527184400@c.us",
      "chat_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
      "created_at": "2025-01-18T14:51:03+00:00",
      "updated_at": "2025-01-27T11:08:10.696758+00:00",
      "assigned_to": "bharat@hashlabs.dev",
      "chat_access": {
          "bharat@hashlabs.dev": true
      },
      "invite_link": "https://chat.whatsapp.com/invite/FhdajOVFGeRLTSodeq5wec"
      "member_count": 2,
      "flag_count_map": null,
      "latest_message": {
          "id": {
              "id": "3EB0297C336FD627EAF4447CFC1DEB49394D7874",
              "remote": "919537851844@c.us",
              "from_me": true,
              "serialized": "true_919537851844@c.us_3EB0297C336FD627EAF4447CFC1DEB49394D7874"
          },
          "to": null,
          "ack": "4",
          "fts": "'/invite/cuzauensb6e8sk7r3dopd3':12 '1040':9 'activ':29 'becom':28 'cannot':15 'chat.whatsapp.com':11 'chat.whatsapp.com/invite/cuzauensb6e8sk7r3dopd3':10 'click':16 'invit':4 'join':6 'link':18,26 'messag':23 'new':8 'pleas':19 'respond':20 'test':7",
          "body": "You have been invited to join Test New 1040\n\nhttps://chat.whatsapp.com/invite/CuZAuEnSB6e8sk7R3dopD3\n\nIf you cannot click the link, please respond to this message, and the link will become active",
          "from": null,
          "links": null,
          "media": null,
          "token": null,
          "author": null,
          "is_gif": null,
          "org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
          "vcards": null,
          "chat_id": "919537851844@c.us",
          "from_me": true,
          "duration": null,
          "location": null,
          "order_id": null,
          "raw_data": null,
          "broadcast": null,
          "has_media": null,
          "invite_v4": null,
          "is_status": null,
          "media_key": null,
          "org_phone": "918527184400@c.us",
          "poll_info": null,
          "prev_body": null,
          "timestamp": "2025-01-27T11:07:56+00:00",
          "unique_id": "3EB0297C336FD627EAF4447CFC1DEB49394D7874",
          "is_deleted": null,
          "is_starred": null,
          "message_id": "true_919537851844@c.us_3EB0297C336FD627EAF4447CFC1DEB49394D7874",
          "updated_at": "2025-01-27T11:08:10.693+00:00",
          "device_type": null,
          "flag_status": null,
          "broadcast_id": null,
          "has_reaction": null,
          "is_ephemeral": null,
          "is_forwarded": null,
          "message_type": "chat",
          "performed_by": null,
          "poll_results": null,
          "sender_phone": "918527184400@c.us",
          "delivery_info": {
              "read": {
                  "919537851844@c.us": 1737976090690
              },
              "pending": [],
              "delivered": {
                  "919537851844@c.us": 1737976082277
              },
              "read_count": 1,
              "delivered_count": 1
          },
          "flag_metadata": null,
          "mentioned_ids": [],
          "has_quoted_msg": null,
          "sent_message_id": "f97ac2f7-2a2d-43b3-8f6c-dfb17973b1b9",
          "forwarding_score": null,
          "message_ticket_id": null,
          "quoted_message_id": null,
          "flag_response_time": null
      },
      "info_admins_only": null,
      "custom_properties": {
          "property-tlkudzxmhjkgoktm": "hello"
      },
      "group_description": null,
      "message_unread_count": null,
      "messages_admins_only": null,
      "add_members_admins_only": null,
      "parent_community_id": null,
  }
  ```
</ResponseExample>

**Attributes**

<ParamField path="org_id" type="string">
  The unique identifier of the organization that owns the WhatsApp account.
</ParamField>

<ParamField path="chat_id" type="string">
  The unique identifier of the WhatsApp chat (format: `{phone_number}@c.us` for individual chats or `{group_id}@g.us` for groups).
</ParamField>

<ParamField path="members" type="object">
  A map of members in the chat, keyed by WhatsApp ID (format: `{phone_number}@c.us`).

  <Expandable>
    <ParamField path="org_id" type="string">
      The unique identifier of the organization that owns the WhatsApp account.
    </ParamField>

    <ParamField path="chat_id" type="string">
      The unique identifier of the WhatsApp chat.
    </ParamField>

    <ParamField path="is_admin" type="boolean">
      Indicates if the member has admin privileges in the chat.
    </ParamField>

    <ParamField path="org_phone" type="string">
      The WhatsApp ID of the organization's account (format: `{phone_number}@c.us`).
    </ParamField>

    <ParamField path="contact_id" type="string">
      The WhatsApp ID of the member (format: `{phone_number}@c.us`).
    </ParamField>

    <ParamField path="is_internal" type="boolean">
      Indicates if the member is an internal user of the organization.
    </ParamField>

    <ParamField path="contact_name" type="string">
      The display name of the member.
    </ParamField>

    <ParamField path="contact_color" type="string">
      The hex color code assigned to the member in Periskope's UI.
    </ParamField>

    <ParamField path="contact_image" type="string">
      The URL of the member's profile image.
    </ParamField>

    <ParamField path="is_super_admin" type="boolean">
      Indicates if the member has super admin privileges in the chat.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="chat_name" type="string">
  The display name of the chat. For groups, this is the group name. For individual chats, this is the contact's name.
</ParamField>

<ParamField path="chat_type" type="string">
  The type of chat. Can be `group`, `user`, or `business`.
</ParamField>

<ParamField path="org_phone" type="string">
  The organization phone that the chat belongs to(in the format `{phone_number}@c.us`)
</ParamField>

<ParamField path="chat_image" type="string">
  The URL of the chat's profile image.
</ParamField>

<ParamField path="created_at" type="string">
  The ISO 8601 formatted timestamp when the chat was created.
</ParamField>

<ParamField path="updated_at" type="string">
  The ISO 8601 formatted timestamp when the chat was last updated.
</ParamField>

<ParamField path="latest_message" type="object">
  An object containing details about the latest message sent in the chat.
</ParamField>

<ParamField path="invite_link" type="string">
  The invite link of the chat.
</ParamField>

<ParamField path="is_muted" type="boolean">
  Indicates if notifications for this chat are muted.
</ParamField>

<ParamField path="is_archived" type="boolean">
  Indicates if the chat has been archived.
</ParamField>

<ParamField path="custom_properties" type="object">
  A map of custom properties associated with the chat. Values depend on the property type:

  * `dropdown`: Selected option from predefined choices
  * `text`: Text string value
  * `date`: Date value
</ParamField>

<ParamField path="group_description" type="string">
  The description text for group chats.
</ParamField>

<ParamField path="message_unread_count" type="number">
  The number of unread messages in the chat.
</ParamField>

<ParamField path="closed_at" type="string">
  The ISO 8601 formatted timestamp when the chat was closed, if applicable.
</ParamField>

<ParamField path="is_exited" type="boolean">
  Indicates if the organization has left this chat.
</ParamField>

<ParamField path="label_ids" type="object">
  A map of label identifiers associated with the chat, where keys are label IDs and values are booleans.
</ParamField>

<ParamField path="labels" type="array">
  An array of labels associated with the chat.
</ParamField>

<ParamField path="assigned_to" type="string">
  The email address of the user assigned to this chat.
</ParamField>

<ParamField path="chat_access" type="object">
  A map of user access permissions, where keys are email addresses and values are booleans.
</ParamField>

<ParamField path="member_count" type="number">
  The total number of participants in the chat.
</ParamField>

<ParamField path="flag_count_map" type="object">
  A map of flagged messages, where keys are phone numbers and values are flagged messages count.
</ParamField>

<ParamField path="info_admins_only" type="boolean">
  Indicates if only admins can modify group info.
</ParamField>

<ParamField path="messages_admins_only" type="boolean">
  Indicates if only admins can send messages in the group.
</ParamField>

<ParamField path="add_members_admins_only" type="boolean">
  Indicates if only admins can add new members to the group.
</ParamField>

<ParamField path="parent_community_id" type="boolean">
  Indicates the id of the parent community for the group.
</ParamField>
