> ## 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

> A WhatsApp chat (1-1 conversation or group) synced into the workspace, together with its Periskope attributes (labels, assignee, custom properties, status).

<ResponseExample>
  ```json The Chat Object theme={null}
  {
    "org_id": "00000000-0000-0000-0000-000000000000",
    "chat_id": "120363000000000000@g.us",
    "org_phone": "911111111111@c.us",
    "chat_name": "Example Group",
    "chat_type": "group",
    "chat_image": "https://example.com/images/example.jpg",
    "invite_link": "https://chat.whatsapp.com/invite/AAAAAAAAAAAAAAAAAAAAAA",
    "label_ids": {
      "label-aaaaaaaaaaaaaaaa": true
    },
    "labels": [
      "priority"
    ],
    "custom_properties": {
      "Custom Property": "Value"
    },
    "assigned_to": "user@example.com",
    "chat_access": {
      "user@example.com": true
    },
    "group_description": "A sample group description",
    "info_admins_only": false,
    "messages_admins_only": false,
    "add_members_admins_only": false,
    "member_count": 12,
    "members": {
      "key": {
        "org_id": "00000000-0000-0000-0000-000000000000",
        "chat_id": "120363000000000000@g.us",
        "org_phone": "911111111111@c.us",
        "contact_id": "922222222222@c.us",
        "contact_name": "John Doe",
        "contact_image": "https://example.com/images/example.jpg",
        "contact_color": "#000000",
        "is_admin": false,
        "is_super_admin": false,
        "is_internal": false
      }
    },
    "latest_message": {
      "message_id": "true_120363000000000000@g.us_AAAAAAAAAAAAAAAAAAAAAA",
      "org_id": "00000000-0000-0000-0000-000000000000",
      "org_phone": "911111111111@c.us",
      "chat_id": "120363000000000000@g.us",
      "body": "Hello! This is a sample message.",
      "message_type": "chat",
      "from_me": true,
      "author": "922222222222@c.us",
      "ack": "4",
      "timestamp": "2026-01-15T09:30:00+00:00",
      "media": {
        "path": "https://example.com/images/example.jpg",
        "mimetype": "image/png",
        "filename": "image.png"
      },
      "mentioned_ids": [
        "922222222222@c.us"
      ],
      "performed_by": "api",
      "quoted_message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "sender_phone": "911111111111@c.us",
      "sent_message_id": "00000000-0000-0000-0000-000000000000",
      "delivery_info": {
        "delivered": {
          "key": null
        },
        "read": {
          "key": null
        },
        "pending": [
          null
        ],
        "read_count": null,
        "delivered_count": null
      },
      "is_deleted": null,
      "is_forwarded": null,
      "is_starred": null,
      "has_media": null,
      "unique_id": "AAAAAAAAAAAAAAAAAAAAAA",
      "updated_at": "2026-01-15T09:31:12.884+00:00"
    },
    "latest_message_timestamp": "2026-01-15T09:30:00+00:00",
    "message_unread_count": 0,
    "flag_count_map": {
      "key": null
    },
    "parent_community_id": null,
    "is_archived": false,
    "group_metadata": {},
    "is_muted": false,
    "is_exited": false,
    "closed_at": null,
    "created_at": "2026-01-10T08:00:00+00:00",
    "updated_at": "2026-01-15T09:30:00.025233+00:00"
  }
  ```
</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="org_phone" type="string">
  The organization phone that the chat belongs to (in the format \{phone\_number}@c.us).
</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="chat_image" type="string">
  The URL of the chat's profile image.
</ParamField>

<ParamField path="invite_link" type="string">
  The invite link of the chat. Group chats only, and only when the phone is an admin.
</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="string[]">
  An array of labels associated with the chat.
</ParamField>

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

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

<ParamField path="chat_access" type="object">
  A map of user access permissions, where keys are email addresses and values are booleans. Absent when no per-chat overrides exist.
</ParamField>

<ParamField path="group_description" type="string">
  The description text for group chats. Group chats only.
</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="member_count" type="integer">
  The total number of participants in the chat.
</ParamField>

<ParamField path="members" type="object">
  A map of members in the chat, keyed by WhatsApp ID (format: \{phone\_number}@c.us). Only returned when fetching a single chat by id — list results omit it.

  <Expandable title="each value">
    <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="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="contact_name" type="string">
      The display name of the member.
    </ParamField>

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

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

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

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

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

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

  <Expandable title="properties">
    <ParamField path="message_id" type="string">
      Unique id of the message, in the form \<from\_me>*\<chat\_id>*\<wa\_message\_id>
    </ParamField>

    <ParamField path="org_id" type="string">
      Id of the organization the message belongs to
    </ParamField>

    <ParamField path="org_phone" type="string">
      Org phone (WhatsApp account) the message was sent or received on, as country code + number suffixed with @c.us
    </ParamField>

    <ParamField path="chat_id" type="string">
      Chat the message belongs to — \<countrycode>\<number>@c.us for 1-1 chats, \<group-id>@g.us for group chats
    </ParamField>

    <ParamField path="body" type="string">
      Text content of the message, or the caption of a media message.
    </ParamField>

    <ParamField path="message_type" type="string">
      Content type of the message: 'chat' for text, otherwise the media/attachment type (e.g. 'image', 'video', 'document', 'audio', 'ptt', 'sticker', 'location', 'poll\_creation')
    </ParamField>

    <ParamField path="from_me" type="boolean">
      true when the message was sent by the org phone, false when it was received from the contact
    </ParamField>

    <ParamField path="author" type="string">
      In group chats, the participant who sent the message (\<countrycode>\<number>@c.us).
    </ParamField>

    <ParamField path="ack" type="string">
      WhatsApp acknowledgement level of an outgoing message as a string: '1' sent, '2' delivered, '3' read, '4' played/read.
    </ParamField>

    <ParamField path="timestamp" type="string">
      When the message was sent, as an ISO 8601 UTC timestamp
    </ParamField>

    <ParamField path="media" type="object">
      Media attached to the message (may also carry dimensions, size, thumbnail).

      <Expandable title="properties">
        <ParamField path="path" type="string">
          URL of the media file
        </ParamField>

        <ParamField path="mimetype" type="string">
          MIME type of the media file
        </ParamField>

        <ParamField path="filename" type="string">
          Filename of the media file, when applicable
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="mentioned_ids" type="string[]">
      Contact ids @-mentioned in the message body.
    </ParamField>

    <ParamField path="performed_by" type="string">
      Member email or "api" when the message was sent through Periskope.
    </ParamField>

    <ParamField path="quoted_message_id" type="string">
      message\_id of the message this message replies to. Absent when the message is not a reply.
    </ParamField>

    <ParamField path="sender_phone" type="string">
      Phone that sent the message, as country code + number suffixed with @c.us
    </ParamField>

    <ParamField path="sent_message_id" type="string">
      Internal id assigned when the message was sent via the Periskope queue. Absent for received messages.
    </ParamField>

    <ParamField path="delivery_info" type="object">
      Per-recipient delivery and read receipts of an outgoing message.

      <Expandable title="properties">
        <ParamField path="delivered" type="object">
          Map of recipient contact\_id to delivery epoch-ms timestamp
        </ParamField>

        <ParamField path="read" type="object">
          Map of recipient contact\_id to read epoch-ms timestamp
        </ParamField>

        <ParamField path="pending" type="string[]">
          Recipients the message has not been delivered to yet
        </ParamField>

        <ParamField path="read_count" type="number">
          Number of recipients who have read the message
        </ParamField>

        <ParamField path="delivered_count" type="number">
          Number of recipients the message was delivered to
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="is_deleted" type="boolean">
      true when the message was deleted for everyone.
    </ParamField>

    <ParamField path="is_forwarded" type="boolean">
      true when the message was forwarded.
    </ParamField>

    <ParamField path="is_starred" type="boolean">
      true when the message is starred.
    </ParamField>

    <ParamField path="has_media" type="boolean">
      true when the message carries media.
    </ParamField>

    <ParamField path="unique_id" type="string">
      WhatsApp message id without the from\_me/chat\_id prefix — accepted by message endpoints in place of the full message\_id
    </ParamField>

    <ParamField path="updated_at" type="string">
      When the message record was last updated (e.g. by a delivery receipt), as an ISO 8601 UTC timestamp
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="latest_message_timestamp" type="string">
  Timestamp of the most recent message in the chat, as an ISO 8601 UTC timestamp.
</ParamField>

<ParamField path="message_unread_count" type="integer">
  The number of unread messages 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="parent_community_id" type="string">
  Indicates the id of the parent community for the group.
</ParamField>

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

<ParamField path="group_metadata" type="object">
  Additional raw group metadata synced from WhatsApp, when present
</ParamField>

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

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

<ParamField path="closed_at" type="number">
  The timestamp when the chat was closed, if applicable, as an epoch timestamp in milliseconds. Absent while the chat is open.
</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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.