Skip to main content
GET
Get full or filtered list of all chats in the Workspace.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

label
string

filters chats having at least one of specified labels (comma-separated)

whatsapp_account_id
string

filters chats belonging to one of the specified WhatsApp accounts (in wid format, comma-separated)

group
boolean

filters chats that are either group chats (true) or direct chats (false)

responsible
string

filters chats assigned to specific users (denoted by email address, comma-separated)

name
string

filter chats that contain any of specified strings (case-insensitive, comma-separated). Note: a string containing a whitespace will be matched as exact substring without being split to words.

phone
string

Filter direct (non-group) chats by a single phone number. Phone is sanitized in the same way as for sending messages. If sanitized value starts with '+', the match is exact. Otherwise, leading zeroes are removed and the number is matched as a substring of the stored phone. Group chats are always excluded when this parameter is used.

read
boolean

filter chats that are either read (true) or unread (false)

closed
boolean

filter chats that are either closed (true) or open (false)

chatgpt_autoresponse_enabled
boolean

filter chats where chatgpt auto-response is enabled (true) or disabled (false)

chat_sync
boolean

filter chats with Message Sync on (true) or off (false). A chat with chat_sync null is returned for neither value

page
integer

specify the page of results (each page contains up to page_size items), starting with 1. Check "has more page" response value to see if more pages are available.

page_size
integer

Number of items per page. Defaults to 50. Minimum 1. Maximum 100.

Required range: 1 <= x <= 100
created_after
string<date-time>

filter chats that were created after this timestamp, can be specified with created_before

created_before
string<date-time>

filter chats that were created before this timestamp, can be specified with created_after

last_message_after
string<date-time>

filter chats whose most recent message (including internal notes) is at or after this timestamp, can be specified with last_message_before. Include the timezone offset; a value without one is read in the server timezone. Chats without messages are excluded when this parameter is set.

last_message_before
string<date-time>

filter chats whose most recent message (including internal notes) is at or before this timestamp, can be specified with last_message_after. Include the timezone offset; a value without one is read in the server timezone. Chats without messages are excluded when this parameter is set.

whatsapp_phone
string

Filter chats by contact phone number(s) (comma-separated). Each number is matched both against the direct chat's phone (tolerating a leading 0 in place of the country code, or an already-international number) and against group membership, so groups containing a matching member are included too.

with_msg
boolean

when true, include the full last_message object (in addition to last_message_uid / last_message_timestamp) for each chat.

Response

Success

status
enum<string>
required
Available options:
ok,
error
Example:

"ok"

data
object
required