Chat
Dialogs List
Endpoint
Parameters
Parameter | Data type | Description | Value example |
---|---|---|---|
updated_at | integer (timestamp) | Filter dialogs by updated_at field (operators gt , lt , gte , lte ) | updated_at[gt]=1687886581 |
created_at | integer (timestamp) | Filter dialogs by updated_at field (operators gt , lt , gte , lte ) | created_at[lte]=1687886581 |
_id | string (ObjectId) | Filter dialogs by _id field (operators gt , lt , gte , lte ) | _id[gte]=620e2b1463ee2a1977b4ee65 |
limit | integer | Dialogs in one response (default 100, max 100) | limit=50 |
sort_asc/sort_desc | string | Set sort direction asc/desc (supported fields created_at , updated_at , _id ) | sort_desc=updated_at |
Request example
Response
Response is similar to Retrieve dialog API, but with additional fields
Parameter | Data type | Description | Value example |
---|---|---|---|
silent_ids | array of int (field may be missing) | Array of users ids who muted chat | [32241, 32245] |
deleted_ids | array of int (field may be missing) | Array of users ids who deleted chat | [32245] |
NodeJS example
To get list of all dialogs, use pagination by _id
field:
Messages List
Endpoint
Parameters
Parameter | Data type | Description | Value example |
---|---|---|---|
updated_at | integer (timestamp) | Filter messages by updated_at field (operators gt , lt , gte , lte ) | updated_at[gt]=1687886581 |
created_at | integer (timestamp) | Filter messages by updated_at field (operators gt , lt , gte , lte ) | created_at[lte]=1687886581 |
_id | string (ObjectId) | Filter messages by _id field (operators gt , lt , gte , lte ) | _id[gte]=63834bbecf1efb102da40f2c |
limit | integer | Messages in one response (default 100, max 100) | limit=50 |
chat_dialog_id | string (ObjectId) | Filter messages by chat_dialog_id field | chat_dialog_id=61721539107bd9002fdb84ed |
sort_asc/sort_desc | string | Set sort direction asc/desc (supported fields created_at , updated_at , _id ) | sort_desc=updated_at |
Request example
Response
Response is similar to Retrieve messages API, but with additional fields
Parameter | Data type | Description | Value example |
---|---|---|---|
deleted_for_ids | array of int (field may be missing) | Array of users ids who deleted message | [32245] |
NodeJS example
To get list of all messages, use pagination by _id
field: