Chat APIs
Get Chat By ID
API
- Introduction
- Authorization
- Objects
Chat APIs
Group Settings APIs
Message APIs
Chat APIs
Get Chat By ID
This endpoint retrieves a specific chat from its chat_id
curl --request GET \
--url https://api.periskope.app/v1/chats/{chat_id} \
--header 'Authorization: Bearer <token>'
{
"add_members_admins_only": null,
"assigned_to": "bharat@hashlabs.dev",
"chat_access": {
"bharat@hashlabs.dev": true
},
"chat_id": "919537851844@c.us",
"chat_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
"chat_name": "BK Local1",
"chat_org_phones": [
"918527184400@c.us"
],
"chat_type": "user",
"closed_at": null,
"common_chats": [
"120363329861739657@g.us",
"120363331984403446@g.us",
"120363352652386702@g.us",
"120363371655584481@g.us",
"120363372525172897@g.us",
"120363373761356282@g.us",
"120363378751945209@g.us",
"120363387379991154@g.us",
"120363387670530253@g.us",
"120363388696354849@g.us",
"120363389171465741@g.us",
"120363391093262494@g.us",
"120363392071406466@g.us",
"120363392706769636@g.us",
"919537851844@c.us"
],
"created_at": "2025-01-18T14:51:03+00:00",
"custom_properties": {
"property-tlkudzxmhjkgoktm": "hello"
},
"flag_count_map": null,
"group_description": null,
"hubspot_metadata": {},
"info_admins_only": null,
"invite_link": null,
"is_exited": false,
"is_muted": false,
"label_ids": {
"label-xbitdvipqshahdcu": true,
"label-xgargwpbzidjpapt": true
},
"latest_message": {
"ack": "4",
"author": null,
"body": "You have been invited to join Test New 1040\n\nhttps://chat.whatsapp.com/invite/CuZAuEnSB6e8sk7R3dopD3\n\nIf you cannot click the link, please respond to this message, and the link will become active",
"broadcast": null,
"broadcast_id": null,
"chat_id": "919537851844@c.us",
"delivery_info": {
"delivered": {
"919537851844@c.us": 1737976082277
},
"delivered_count": 1,
"pending": [],
"read": {
"919537851844@c.us": 1737976090690
},
"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": "'/invite/cuzauensb6e8sk7r3dopd3':12 '1040':9 'activ':29 'becom':28 'cannot':15 'chat.whatsapp.com':11 'chat.whatsapp.com/invite/cuzauensb6e8sk7r3dopd3':10 'click':16 'invit':4 'join':6 'link':18,26 'messag':23 'new':8 'pleas':19 'respond':20 'test':7",
"has_media": null,
"has_quoted_msg": null,
"has_reaction": null,
"id": {
"from_me": true,
"id": "3EB0297C336FD627EAF4447CFC1DEB49394D7874",
"remote": "919537851844@c.us",
"serialized": "true_919537851844@c.us_3EB0297C336FD627EAF4447CFC1DEB49394D7874"
},
"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_919537851844@c.us_3EB0297C336FD627EAF4447CFC1DEB49394D7874",
"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": "f97ac2f7-2a2d-43b3-8f6c-dfb17973b1b9",
"timestamp": "2025-01-27T11:07:56+00:00",
"to": null,
"token": null,
"unique_id": "3EB0297C336FD627EAF4447CFC1DEB49394D7874",
"updated_at": "2025-01-27T11:08:10.693+00:00",
"vcards": null
},
"member_count": 2,
"members": {
"918527184400@c.us": {
"chat_id": "919537851844@c.us",
"contact_color": "#B4876E",
"contact_id": "918527184400@c.us",
"contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us.jpg?timestamp=1737690126280",
"contact_name": "Support",
"is_admin": true,
"is_internal": true,
"is_super_admin": true,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us"
},
"919537851844@c.us": {
"chat_id": "919537851844@c.us",
"contact_color": "#B4876E",
"contact_id": "919537851844@c.us",
"contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
"contact_name": "BK Local1",
"is_admin": true,
"is_internal": false,
"is_super_admin": true,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us"
}
},
"message_unread_count": null,
"messages_admins_only": null,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us",
"updated_at": "2025-01-27T11:08:10.696758+00:00"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Please provide the number of the phone you want to call with this API in the header. The number must be in country code + number format without any characters or spaces, e.g. 919876543210; Alternatively, provide the phone_id (phone-xxxxxxxxxxxx) in the header
Example:
"{{orgPhone}}"
Path Parameters
- The unique id of the chat
- For individual chats, this would be the country_code + number (e.g., 918527184400), followed by @c.us
- For groups, this would end with @g.us
Example:
"919537851844"
Response
200 - application/json
200 OK
The response is a chat object. Refer to the chat object here
Was this page helpful?
curl --request GET \
--url https://api.periskope.app/v1/chats/{chat_id} \
--header 'Authorization: Bearer <token>'
{
"add_members_admins_only": null,
"assigned_to": "bharat@hashlabs.dev",
"chat_access": {
"bharat@hashlabs.dev": true
},
"chat_id": "919537851844@c.us",
"chat_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
"chat_name": "BK Local1",
"chat_org_phones": [
"918527184400@c.us"
],
"chat_type": "user",
"closed_at": null,
"common_chats": [
"120363329861739657@g.us",
"120363331984403446@g.us",
"120363352652386702@g.us",
"120363371655584481@g.us",
"120363372525172897@g.us",
"120363373761356282@g.us",
"120363378751945209@g.us",
"120363387379991154@g.us",
"120363387670530253@g.us",
"120363388696354849@g.us",
"120363389171465741@g.us",
"120363391093262494@g.us",
"120363392071406466@g.us",
"120363392706769636@g.us",
"919537851844@c.us"
],
"created_at": "2025-01-18T14:51:03+00:00",
"custom_properties": {
"property-tlkudzxmhjkgoktm": "hello"
},
"flag_count_map": null,
"group_description": null,
"hubspot_metadata": {},
"info_admins_only": null,
"invite_link": null,
"is_exited": false,
"is_muted": false,
"label_ids": {
"label-xbitdvipqshahdcu": true,
"label-xgargwpbzidjpapt": true
},
"latest_message": {
"ack": "4",
"author": null,
"body": "You have been invited to join Test New 1040\n\nhttps://chat.whatsapp.com/invite/CuZAuEnSB6e8sk7R3dopD3\n\nIf you cannot click the link, please respond to this message, and the link will become active",
"broadcast": null,
"broadcast_id": null,
"chat_id": "919537851844@c.us",
"delivery_info": {
"delivered": {
"919537851844@c.us": 1737976082277
},
"delivered_count": 1,
"pending": [],
"read": {
"919537851844@c.us": 1737976090690
},
"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": "'/invite/cuzauensb6e8sk7r3dopd3':12 '1040':9 'activ':29 'becom':28 'cannot':15 'chat.whatsapp.com':11 'chat.whatsapp.com/invite/cuzauensb6e8sk7r3dopd3':10 'click':16 'invit':4 'join':6 'link':18,26 'messag':23 'new':8 'pleas':19 'respond':20 'test':7",
"has_media": null,
"has_quoted_msg": null,
"has_reaction": null,
"id": {
"from_me": true,
"id": "3EB0297C336FD627EAF4447CFC1DEB49394D7874",
"remote": "919537851844@c.us",
"serialized": "true_919537851844@c.us_3EB0297C336FD627EAF4447CFC1DEB49394D7874"
},
"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_919537851844@c.us_3EB0297C336FD627EAF4447CFC1DEB49394D7874",
"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": "f97ac2f7-2a2d-43b3-8f6c-dfb17973b1b9",
"timestamp": "2025-01-27T11:07:56+00:00",
"to": null,
"token": null,
"unique_id": "3EB0297C336FD627EAF4447CFC1DEB49394D7874",
"updated_at": "2025-01-27T11:08:10.693+00:00",
"vcards": null
},
"member_count": 2,
"members": {
"918527184400@c.us": {
"chat_id": "919537851844@c.us",
"contact_color": "#B4876E",
"contact_id": "918527184400@c.us",
"contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us.jpg?timestamp=1737690126280",
"contact_name": "Support",
"is_admin": true,
"is_internal": true,
"is_super_admin": true,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us"
},
"919537851844@c.us": {
"chat_id": "919537851844@c.us",
"contact_color": "#B4876E",
"contact_id": "919537851844@c.us",
"contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
"contact_name": "BK Local1",
"is_admin": true,
"is_internal": false,
"is_super_admin": true,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us"
}
},
"message_unread_count": null,
"messages_admins_only": null,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us",
"updated_at": "2025-01-27T11:08:10.696758+00:00"
}