chats to list conversations and apply actions such as archive, mute, pin, and expiration.
For instances, see Instances and billing. For session, see Session.
Chats
client.chats.list(...)
{ page, page_size, total, total_pages, content[] } with chat metadata per item.
client.chats.get(...)
InstanceChatMetadata — phone, jid, name, flags (archived, pinned, muted, etc.) and last message when available.
client.chats.archive(...)
{ status: "ok" }.
client.chats.unarchive(...)
{ status: "ok" }.
client.chats.mute(...)
{ status: "ok" }.
client.chats.unmute(...)
{ status: "ok" }.
client.chats.pin(...)
{ status: "ok" }.
client.chats.unpin(...)
{ status: "ok" }.
client.chats.read(...)
{ status: "ok" }.
client.chats.unread(...)
{ status: "ok" }.
client.chats.clear(...)
{ status: "ok" }.
client.chats.delete(...)
{ status: "ok" }.
client.chats.set_expiration(...)
{ status: "ok" }.
Accepted values for expiration: 24_HOURS, 7_DAYS, 90_DAYS, OFF.
