Skip to main content

Add 'chat_id' Filter to 'GET /chats' Endpoint

Problem: Currently, to find all interactions with a specific contact across multiple Org Phones, we must either:

  1. List all chats for the entire org and filter manually (slow due to created_at sorting).

  2. Call GET /chat/:id repeatedly for every single Org Phone in our workspace.

Proposed Solution: Add a chat_id query parameter to the GET /chats endpoint.

Expected Behavior: GET /chats?chat_id=919876543210@c.us should return an array containing only the chat objects for that specific JID across all organization phone numbers.

Benefit: This allows developers to retrieve a contact's activity and labels across the entire organization in a single, high-performance API call without the overhead of maintaining a separate webhook database.

2 comments

Log in to comment and vote

Comments2

  • Hansal Kothari

    Team•

    Aug 18

    Hi, we have now added this filter in the List all chats API. Thanks!

  • Hansal Kothari

    Team•

    Jun 4

    Hi Team,

    Thank you for submitting your request. We will review the feature internally with our product team and get back to you shortly with an update.