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

# List All Chats

> This endpoint retrieves a paginated list of chats




## OpenAPI

````yaml GET /chats
openapi: 3.0.3
info:
  title: API - Local
  description: >-
    #### Welcome to the official Postman collection of Periskope API


    Periskope APIs enable you automate actions on your WhatsApp phone, and the
    Periskope platform


    - Read more about the APIs & webhooks here -
    [https://docs.periskope.app/api-reference/introduction](https://docs.periskope.app/api-reference/introduction)
        
    - We encourage responsible usage of the APIs. Follow these best practices
    and recommendations for safe actions on WhatsApp -
    [https://docs.periskope.app/get-started/best-practices](https://docs.periskope.app/get-started/best-practices)
        

    #### Getting Started


    ##### Pre-requisites:


    1. **Sign up for a free account on Periskope:** To use the Periskope API,
    you need to have an active Periskope account. If you don’t have one, you can
    sign up for a 7-day free trial [here](https://console.periskope.app).
        
    2. **Scan the QR code from WhatsApp to connect your phone:** A connected
    phone is required to use the APIs
        
    3. **Go to** [Settings &gt;
    API](https://console.periskope.app/settings/api), and generate an API key
    for your organization - The API key is used to authenticate every request.
    Please keep this secure
        

    ##### Using Postman:


    1. **Fork the collection so you can edit values and test the APIs in your
    own postman environment:** To fork the collection, click on the three dots
    next to v1. Then click on create a fork (_shortcut: Ctrl + Alt + F)._
        
    2. **Update the value of the variables in the collection:**  
        \- Update the API key with the key generated in Step 3  
        \- Update the phone number with your connected number. This number will be added to the `x-phone` header across requests
        
        It must be in the format of country code+number, with no special characters or spaces _e.g. +91 98745 32456 becomes 919874532456_
        

    For any help or feedback, please contact us at
    [support@periskope.app](https://mailto:support@periskope.app), or ping us on
    [WhatsApp](https://what.sapp.link/periskope)
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.periskope.app/v1
security:
  - bearerAuth: []
tags:
  - name: contacts
  - name: tickets
  - name: tasks
  - name: phones
  - name: message
  - name: queue
  - name: chats
  - name: group
  - name: members
  - name: webhooks
paths:
  /chats:
    get:
      tags:
        - chats
      summary: List All Chats
      description: |
        This endpoint retrieves a paginated list of chats
      operationId: listAllChats
      parameters:
        - name: offset
          in: query
          schema:
            type: number
            example: '0'
            description: |-
              - The offset value for paginating the results
              - Default 0
        - name: limit
          in: query
          schema:
            type: number
            example: '1000'
            description: |-
              - The maximum number of chats to retrieve
              - Default 2000
        - name: sort_by
          in: query
          schema:
            type: string
            enum:
              - created_at
              - latest_message_timestamp
            default: created_at
            example: created_at
            description: |-
              - Value to sort the incoming chats
              - Possible values: `created_at`, `latest_message_timestamp`
              - Default `created_at`
        - name: sort_order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            example: desc
            description: |-
              - Order to sort the results
              - Possible values: `asc`, `desc`
              - Default `desc`
        - name: chat_id
          in: query
          schema:
            type: string
            example: 120363392071406466@g.us
            description: >-
              - Filter to a specific chat by its chat_id (the chat's unique
              WhatsApp identifier, e.g. a group id ending in @g.us or a contact
              id ending in @c.us). Returns that single chat, the same way the
              Get Chat By ID endpoint does.
        - name: chat_type
          in: query
          schema:
            type: string
            example: group
            description: '- Filter chat by type of user, group or business'
        - name: label
          in: query
          schema:
            type: string
            example: label-kbvlbnvesomvgqpt
            description: |-
              - Filter all chats that contain a specific label provide
              - You can provide the name of the label or label_id
        - name: x-phone
          in: header
          schema:
            type: string
            example: '{{orgPhone}}'
          description: >-
            **Optional.** The phone to scope this request to — in country code +
            number format with no spaces or special characters (e.g.
            919876543210), or the phone_id (phone-xxxxxxxxxxxx). When set, only
            chats for that phone are returned. When omitted, chats are returned
            — across all phones your token can access (the phones in your
            token's scope, or every phone in your organization if the token is
            unscoped). Passing a phone that is outside your token's scope
            returns a 401.
        - name: start_time
          in: query
          schema:
            type: string
            example: 2025-04-25 or 2025-04-25T00:00:00Z
            description: '- The start_time to filter the results'
        - name: end_time
          in: query
          schema:
            type: string
            example: 2025-04-31 or 2025-04-31T23:59:59Z
            description: '- The end_time to filter the results'
      responses:
        '200':
          description: 200 OK
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '25542'
            Date:
              schema:
                type: string
                example: Fri, 24 Jan 2025 05:50:32 GMT
            ETag:
              schema:
                type: string
                example: W/"63c6-nAbTnCbH2Lc6+duwTm5zb0I02Bs"
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            X-Powered-By:
              schema:
                type: string
                example: Express
            X-RateLimit-Limit:
              schema:
                type: string
                example: '10'
            X-RateLimit-Remaining:
              schema:
                type: string
                example: '9'
            X-RateLimit-Reset:
              schema:
                type: string
                example: '1737697834'
            x-periskope-org-id:
              schema:
                type: string
                example: 2997dd64-89bf-48d3-9a22-b314fca017e5
            x-periskope-phone-id:
              schema:
                type: string
                example: phone-bqzvyibhmwkaergr
            x-periskope-trace-id:
              schema:
                type: string
                example: 1fe1cf10-da17-11ef-ac0b-fdf10dd80279
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: number
                    example: 1
                    description: The starting index of the returned chats.
                  to:
                    type: number
                    example: 10
                    description: The ending index of the returned chats.
                  count:
                    type: number
                    example: 10
                    description: The total count of chats.
                  chats:
                    type: array
                    description: >-
                      An array of chat objects. Refer to [the chat object
                      here](/api-reference/objects/the-chat-object)
                description: >-
                  Note: members associated with a chat are not returned. You can
                  fetch a specific chat by calling the Get Chat By ID endpoint
              examples:
                200 OK:
                  value:
                    chats:
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363393294700553@g.us
                        chat_image: null
                        chat_name: Test New 1039
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '2025-01-24T05:11:03+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/CGpMRj9oKDVGHSho7wOkIA
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 1
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-24T05:11:10.691753+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363373936603867@g.us
                        chat_image: null
                        chat_name: Testing1234
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '2025-01-20T12:03:21+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: null
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message:
                          ack: '4'
                          author: null
                          body: Hello, East Jenniferfurt!
                          broadcast: null
                          broadcast_id: null
                          chat_id: 120363373936603867@g.us
                          delivery_info:
                            delivered:
                              919971844008@c.us: 1737457813000
                            delivered_count: 1
                            pending: []
                            read:
                              919971844008@c.us: 1737457847000
                            read_count: 1
                          device_type: null
                          duration: null
                          flag_metadata: null
                          flag_response_time: null
                          flag_status: null
                          forwarding_score: null
                          from: null
                          from_me: true
                          fts: '''east'':2 ''hello'':1 ''jenniferfurt'':3'
                          has_media: null
                          has_quoted_msg: null
                          has_reaction: null
                          id:
                            from_me: true
                            id: 3EB0E9AF26D15A11C93960E7CACC60B03A614A07
                            remote: 120363373936603867@g.us
                            serialized: >-
                              true_120363373936603867@g.us_3EB0E9AF26D15A11C93960E7CACC60B03A614A07
                          interactive: null
                          invite_v4: null
                          is_deleted: null
                          is_ephemeral: null
                          is_forwarded: null
                          is_gif: null
                          is_starred: null
                          is_status: null
                          links: null
                          location: null
                          media: null
                          media_key: null
                          mentioned_ids: []
                          message_id: >-
                            true_120363373936603867@g.us_3EB0E9AF26D15A11C93960E7CACC60B03A614A07
                          message_ticket_id: null
                          message_type: chat
                          order_id: null
                          org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                          org_phone: 918527184400@c.us
                          performed_by: null
                          poll_info: null
                          poll_results: null
                          prev_body: null
                          quoted_message_id: null
                          raw_data: null
                          sender_phone: 918527184400@c.us
                          sent_message_id: 90012031-9e18-4cf6-b169-f5dd50b26dcf
                          timestamp: '2025-01-21T11:10:13+00:00'
                          to: null
                          token: null
                          unique_id: 3EB0E9AF26D15A11C93960E7CACC60B03A614A07
                          updated_at: '2025-01-21T11:14:16.233+00:00'
                          vcards: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:04.316415+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363376050029178@g.us
                        chat_image: null
                        chat_name: Test Czech Republic
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '2025-01-20T11:40:20+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/B7NJcQ8qKR68G4CMHvSx9n
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 1
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:05.428429+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363374949245199@g.us
                        chat_image: null
                        chat_name: Test Burundi
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '2025-01-20T11:38:42+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/BoU9NjAj7kjAeZT1CktwnM
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 1
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:16.574283+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363371308389685@g.us
                        chat_image: null
                        chat_name: Test Ukraine
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '2025-01-11T11:47:50+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/IxVB9Eup9aREKqmyOC6JyK
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-24T03:21:54.192067+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363372525172897@g.us
                        chat_image: null
                        chat_name: Test Jordan
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/CHfYB8MxN4d2wI2mjFI2wd
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message:
                          ack: '0'
                          author: null
                          body: morning broadcast
                          broadcast: false
                          broadcast_id: null
                          chat_id: 120363372525172897@g.us
                          delivery_info:
                            delivered_count: 0
                            pending: []
                            read_count: 0
                          device_type: null
                          duration: null
                          flag_metadata: null
                          flag_response_time: null
                          flag_status: null
                          forwarding_score: null
                          from: null
                          from_me: false
                          fts: '''broadcast'':2 ''morn'':1'
                          has_media: null
                          has_quoted_msg: null
                          has_reaction: null
                          id:
                            from_me: false
                            id: 3EB0B00DE7E55A4C17E9736D460E32F1D9EF22A9
                            remote: 120363372525172897@g.us
                            serialized: >-
                              false_120363372525172897@g.us_3EB0B00DE7E55A4C17E9736D460E32F1D9EF22A9
                          interactive: null
                          invite_v4: null
                          is_deleted: null
                          is_ephemeral: null
                          is_forwarded: null
                          is_gif: null
                          is_starred: null
                          is_status: null
                          links: null
                          location: null
                          media: null
                          media_key: null
                          mentioned_ids: []
                          message_id: >-
                            false_120363372525172897@g.us_3EB0B00DE7E55A4C17E9736D460E32F1D9EF22A9
                          message_ticket_id: null
                          message_type: chat
                          order_id: null
                          org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                          org_phone: 918527184400@c.us
                          performed_by: null
                          poll_info: null
                          poll_results: null
                          prev_body: null
                          quoted_message_id: null
                          raw_data: null
                          sender_phone: 919971844008@c.us
                          sent_message_id: null
                          timestamp: '2025-01-21T04:12:02+00:00'
                          to: null
                          token: null
                          unique_id: 3EB0B00DE7E55A4C17E9736D460E32F1D9EF22A9
                          updated_at: '2025-01-21T07:47:56.917+00:00'
                          vcards: null
                        member_add_mode: 'false'
                        member_count: 3
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:15.256053+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363386347133520@g.us
                        chat_image: null
                        chat_name: Test Guyana
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/BPF2DuHV8lkH6GnDr1VqlT
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:13.375748+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363388696354849@g.us
                        chat_image: null
                        chat_name: Test Tanzania
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/IEo71cjf8gyGiqBQc9Qnaz
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:13.313762+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363392706769636@g.us
                        chat_image: null
                        chat_name: Test Micronesia
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/Bz8weeyUHOWG56ur7fXbNE
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:12.356512+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363387379991154@g.us
                        chat_image: null
                        chat_name: >-
                          Test British Indian Ocean Territory (Chagos
                          Archipelago)
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/BigGuHS9sb23hlHMRtweVp
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:10.380164+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363389171465741@g.us
                        chat_image: null
                        chat_name: Test Sri Lanka
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/LHOW1jCsZYM0SqGK5o65NL
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 3
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:10.304499+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363329861739657@g.us
                        chat_image: null
                        chat_name: Test Skope Final 947
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/K2oBToo4ZSNCUbt8Z1dfr1
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message:
                          ack: '0'
                          author: null
                          body: '123'
                          broadcast: null
                          broadcast_id: null
                          chat_id: 120363329861739657@g.us
                          delivery_info:
                            delivered_count: 0
                            pending: []
                            read_count: 0
                          device_type: null
                          duration: null
                          flag_metadata: null
                          flag_response_time: null
                          flag_status: null
                          forwarding_score: null
                          from: null
                          from_me: false
                          fts: '''123'':1'
                          has_media: null
                          has_quoted_msg: null
                          has_reaction: null
                          id:
                            from_me: false
                            id: 3EB02B5D79E809F09D18C38DC398BCD099E09D5C
                            remote: 120363329861739657@g.us
                            serialized: >-
                              false_120363329861739657@g.us_3EB02B5D79E809F09D18C38DC398BCD099E09D5C
                          interactive: null
                          invite_v4: null
                          is_deleted: null
                          is_ephemeral: null
                          is_forwarded: null
                          is_gif: null
                          is_starred: null
                          is_status: null
                          links: null
                          location: null
                          media: null
                          media_key: null
                          mentioned_ids: []
                          message_id: >-
                            false_120363329861739657@g.us_3EB02B5D79E809F09D18C38DC398BCD099E09D5C
                          message_ticket_id: null
                          message_type: chat
                          order_id: null
                          org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                          org_phone: 918527184400@c.us
                          performed_by: null
                          poll_info: null
                          poll_results: null
                          prev_body: null
                          quoted_message_id: null
                          raw_data: null
                          sender_phone: 919971844008@c.us
                          sent_message_id: null
                          timestamp: '2024-12-18T10:14:03+00:00'
                          to: null
                          token: null
                          unique_id: 3EB02B5D79E809F09D18C38DC398BCD099E09D5C
                          updated_at: '2025-01-21T07:47:57.308+00:00'
                          vcards: null
                        member_add_mode: 'false'
                        member_count: 3
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:09.319248+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363371655584481@g.us
                        chat_image: null
                        chat_name: Test Finland
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/BonKrc8QQfe8RjFI6qNJTh
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:07.220729+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363388281538713@g.us
                        chat_image: null
                        chat_name: Test Chile
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/GKvB8VbgX59ClibbEKFxY3
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message:
                          ack: '0'
                          author: null
                          body: morning broadcast
                          broadcast: false
                          broadcast_id: null
                          chat_id: 120363388281538713@g.us
                          delivery_info:
                            delivered_count: 0
                            pending: []
                            read_count: 0
                          device_type: null
                          duration: null
                          flag_metadata: null
                          flag_response_time: null
                          flag_status: null
                          forwarding_score: null
                          from: null
                          from_me: false
                          fts: '''broadcast'':2 ''morn'':1'
                          has_media: null
                          has_quoted_msg: null
                          has_reaction: null
                          id:
                            from_me: false
                            id: 3EB0903DD9BE0FECFD0FC6293877F55B1D71CB6C
                            remote: 120363388281538713@g.us
                            serialized: >-
                              false_120363388281538713@g.us_3EB0903DD9BE0FECFD0FC6293877F55B1D71CB6C
                          interactive: null
                          invite_v4: null
                          is_deleted: null
                          is_ephemeral: null
                          is_forwarded: null
                          is_gif: null
                          is_starred: null
                          is_status: null
                          links: null
                          location: null
                          media: null
                          media_key: null
                          mentioned_ids: []
                          message_id: >-
                            false_120363388281538713@g.us_3EB0903DD9BE0FECFD0FC6293877F55B1D71CB6C
                          message_ticket_id: null
                          message_type: chat
                          order_id: null
                          org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                          org_phone: 918527184400@c.us
                          performed_by: null
                          poll_info: null
                          poll_results: null
                          prev_body: null
                          quoted_message_id: null
                          raw_data: null
                          sender_phone: 919971844008@c.us
                          sent_message_id: null
                          timestamp: '2025-01-21T04:12:02+00:00'
                          to: null
                          token: null
                          unique_id: 3EB0903DD9BE0FECFD0FC6293877F55B1D71CB6C
                          updated_at: '2025-01-21T07:47:56.946+00:00'
                          vcards: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:06.295071+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363387670530253@g.us
                        chat_image: null
                        chat_name: Test Mali
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/DlYalEdkxfsBFt4OPAUUUM
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:03.266682+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363391093262494@g.us
                        chat_image: null
                        chat_name: Test Liberia
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/JfZOBaDWwlBBMFsJ2Yb81z
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:03.10113+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363373397909338@g.us
                        chat_image: null
                        chat_name: Test Central African Republic
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/GBJjd4FATw46cTJrnuELF4
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 1
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:01.158254+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363372297359294@g.us
                        chat_image: null
                        chat_name: Test Sao Tome and Principe
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/LEEf0ucs43ICdvaMrEIwHZ
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 1
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:01.134314+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363373761356282@g.us
                        chat_image: null
                        chat_name: Test Nauru
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/FGrF4wyevSZCb2Aw9sj8j0
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:00.097896+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363331984403446@g.us
                        chat_image: null
                        chat_name: Test Skope Final 5
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/GwTNgUrKe7N9HPkHiCEoIs
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message:
                          ack: '0'
                          author: null
                          body: Hey
                          broadcast: null
                          broadcast_id: null
                          chat_id: 120363331984403446@g.us
                          delivery_info:
                            delivered_count: 0
                            pending: []
                            read_count: 0
                          device_type: null
                          duration: null
                          flag_metadata: null
                          flag_response_time: null
                          flag_status: null
                          forwarding_score: null
                          from: null
                          from_me: false
                          fts: '''hey'':1'
                          has_media: null
                          has_quoted_msg: null
                          has_reaction: null
                          id:
                            from_me: false
                            id: 75EF52B48E7850F1CF98BBAFE304EC51
                            remote: 120363331984403446@g.us
                            serialized: >-
                              false_120363331984403446@g.us_75EF52B48E7850F1CF98BBAFE304EC51
                          interactive: null
                          invite_v4: null
                          is_deleted: null
                          is_ephemeral: null
                          is_forwarded: null
                          is_gif: null
                          is_starred: null
                          is_status: null
                          links: null
                          location: null
                          media: null
                          media_key: null
                          mentioned_ids: []
                          message_id: >-
                            false_120363331984403446@g.us_75EF52B48E7850F1CF98BBAFE304EC51
                          message_ticket_id: null
                          message_type: chat
                          order_id: null
                          org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                          org_phone: 918527184400@c.us
                          performed_by: null
                          poll_info: null
                          poll_results: null
                          prev_body: null
                          quoted_message_id: null
                          raw_data: null
                          sender_phone: 919971844008@c.us
                          sent_message_id: null
                          timestamp: '2024-10-24T03:59:11+00:00'
                          to: null
                          token: null
                          unique_id: 75EF52B48E7850F1CF98BBAFE304EC51
                          updated_at: '2025-01-21T07:47:57.372+00:00'
                          vcards: null
                        member_add_mode: 'true'
                        member_count: 3
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:19.483616+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363378277037444@g.us
                        chat_image: null
                        chat_name: Test <> Xindus 2
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: null
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/Jc8jJTRDm6w6nkXTZA5CsE
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:17.570189+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363352652386702@g.us
                        chat_image: >-
                          https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F120363352652386702%40g.us.jpg?timestamp=1737445696596
                        chat_name: Test Skope Final 9473
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: Wazza dobbs
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/IZB4Zq3Ylt556F2wfWNrm8
                        is_exited: false
                        is_muted: true
                        label_ids: {}
                        latest_message:
                          ack: '0'
                          author: null
                          body: Heyy
                          broadcast: null
                          broadcast_id: null
                          chat_id: 120363352652386702@g.us
                          delivery_info:
                            delivered_count: 0
                            pending: []
                            read_count: 0
                          device_type: null
                          duration: null
                          flag_metadata: null
                          flag_response_time: null
                          flag_status: null
                          forwarding_score: null
                          from: null
                          from_me: false
                          fts: '''heyi'':1'
                          has_media: null
                          has_quoted_msg: null
                          has_reaction: null
                          id:
                            from_me: false
                            id: 147C1AF10C9C934CF18A0B69FF949968
                            remote: 120363352652386702@g.us
                            serialized: >-
                              false_120363352652386702@g.us_147C1AF10C9C934CF18A0B69FF949968
                          interactive: null
                          invite_v4: null
                          is_deleted: null
                          is_ephemeral: null
                          is_forwarded: null
                          is_gif: null
                          is_starred: null
                          is_status: null
                          links: null
                          location: null
                          media: null
                          media_key: null
                          mentioned_ids: []
                          message_id: >-
                            false_120363352652386702@g.us_147C1AF10C9C934CF18A0B69FF949968
                          message_ticket_id: null
                          message_type: chat
                          order_id: null
                          org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                          org_phone: 918527184400@c.us
                          performed_by: null
                          poll_info: null
                          poll_results: null
                          prev_body: null
                          quoted_message_id: null
                          raw_data: null
                          sender_phone: 919971844008@c.us
                          sent_message_id: null
                          timestamp: '2025-01-01T15:30:20+00:00'
                          to: null
                          token: null
                          unique_id: 147C1AF10C9C934CF18A0B69FF949968
                          updated_at: '2025-01-21T07:47:57.308+00:00'
                          vcards: null
                        member_add_mode: 'false'
                        member_count: 3
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:16.599646+00:00'
                      - assigned_to: null
                        chat_access: null
                        chat_id: 120363378751945209@g.us
                        chat_image: >-
                          https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F120363378751945209%40g.us.jpg?timestamp=1737445695527
                        chat_name: Test Skope New
                        chat_org_phones:
                          - 918527184400@c.us
                        chat_type: group
                        closed_at: null
                        created_at: '1970-01-01T00:00:00+00:00'
                        custom_properties: {}
                        flag_count_map: null
                        group_description: Wazza dobbs
                        hubspot_metadata: {}
                        info_admins_only: false
                        invite_link: >-
                          https://chat.whatsapp.com/invite/Bc5DsgO7y3nDrwChbE1Poe
                        is_exited: false
                        is_muted: false
                        label_ids: {}
                        latest_message: null
                        member_add_mode: 'false'
                        member_count: 2
                        message_unread_count: null
                        messages_admins_only: false
                        org_id: 2997dd64-89bf-48d3-9a22-b314fca017e5
                        org_phone: 918527184400@c.us
                        updated_at: '2025-01-21T07:48:15.531487+00:00'
                    count: 23
                    from: 1
                    to: 23
        '422':
          description: 422 Invalid Limit
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '197'
            Date:
              schema:
                type: string
                example: Thu, 09 Jan 2025 09:08:02 GMT
            ETag:
              schema:
                type: string
                example: W/"c5-sOfQmoGHJ22vOJ8WnucWzYQT5DI"
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            X-Powered-By:
              schema:
                type: string
                example: Express
            X-RateLimit-Limit:
              schema:
                type: string
                example: '10'
            X-RateLimit-Remaining:
              schema:
                type: string
                example: '9'
            X-RateLimit-Reset:
              schema:
                type: string
                example: '1736413684'
            org_id:
              schema:
                type: string
                example: 2997dd64-89bf-48d3-9a22-b314fca017e5
            x-periskope-trace-id:
              schema:
                type: string
                example: 3afe7fa0-ce69-11ef-9fd2-914300695506
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  fields:
                    type: object
                    properties:
                      limit:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Limit should be less than 2000
                          value:
                            type: string
                            example: '10000'
                  message:
                    type: string
                    example: Limit should be less than ${MAX_LIMIT}
                  name:
                    type: string
                    example: Validation Error
                  status:
                    type: number
                    example: 422
              examples:
                422 Invalid Limit:
                  value:
                    code: VALIDATION_ERROR
                    fields:
                      limit:
                        message: Limit should be less than 2000
                        value: '10000'
                    message: Limit should be less than ${MAX_LIMIT}
                    name: Validation Error
                    status: 422
      x-codeSamples:
        - lang: TypeScript
          label: Node.js
          source: |-
            import { PeriskopeApi } from '@periskope/periskope-client';

            const client = new PeriskopeApi({
              authToken: 'YOUR_API_KEY',
              phone: 'YOUR_PHONE_NUMBER', // Optional for this endpoint — omit to return chats across all phones your token can access
            });

            async function getChats() {
              const response = await client.chat.getChats({
                chat_type: 'group',
              });

              console.log(response);
            }

            getChats();
        - lang: cURL
          label: cURL
          source: >
            # x-phone is optional for this endpoint — omit it to return chats
            across all phones your token can access

            curl -X GET \
              https://api.periskope.app/v1/chats \
              -H 'Authorization: Bearer <token>' \
              -H 'Content-Type: application/json' \
              -H 'x-phone: YOUR_PHONE_NUMBER' \
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````