Chat APIs
Update Chat
API
- Introduction
- Authorization
- Objects
Chat APIs
Group Settings APIs
Message APIs
Chat APIs
Update Chat
This endpoint updates properties of a chat
curl --request PATCH \
--url https://api.periskope.app/v1/chats/{chat_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '""'
{
"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_type": "user",
"closed_at": null,
"created_at": "2025-01-18T14:51:03+00:00",
"custom_properties": {
"property-tlkudzxmhjkgoktm": "hello"
},
"group_description": null,
"info_admins_only": null,
"invite_link": null,
"is_exited": false,
"is_muted": false,
"label_ids": {
"label-egylglffhfsuzpbu": true,
"label-jolyvzhabwojsrze": true
},
"labels": [
"chatlabel1",
"chatlabel2"
],
"latest_message": {
"ack": "4",
"author": null,
"body": "You have been invited to join Test New 1039\n\nhttps://chat.whatsapp.com/invite/CGiTdfn1dUM8J67GEx1lyx\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": 1737695471721
},
"delivered_count": 1,
"pending": [],
"read": {
"919537851844@c.us": 1737711828823
},
"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/cgitdfn1dum8j67gex1lyx':12 '1039':9 'activ':29 'becom':28 'cannot':15 'chat.whatsapp.com':11 'chat.whatsapp.com/invite/cgitdfn1dum8j67gex1lyx':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": "3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B",
"remote": "919537851844@c.us",
"serialized": "true_919537851844@c.us_3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B"
},
"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_3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B",
"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": "02a54379-36cc-456b-81c4-09074adf9597",
"timestamp": "2025-01-24T05:11:08+00:00",
"to": null,
"token": null,
"unique_id": "3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B",
"updated_at": "2025-01-24T09:43:48.884+00:00",
"vcards": null
},
"member_add_mode": null,
"member_count": 2,
"messages_admins_only": null,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us",
"updated_at": "2025-01-26T13:05:59.602001+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:
"918527184400"
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"
Body
application/json
- Update the assignee of the chat. The assignee must be a valid email address of a user in the organization
Example:
"bharat@hashlabs.dev"
- A record (key-value pair) of the property name or property id as keys, along with the updated value
Example:
"hello"
- A comma-separated list of labels to be assigned to the chat. All labels are case-insensitive.
- If any label currently does not exist, it will be created
Example:
"chatlabel1,chatlabel2"
Response
200
application/json
200 OK
The response is a chat object. Refer to the chat object here
Was this page helpful?
curl --request PATCH \
--url https://api.periskope.app/v1/chats/{chat_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '""'
{
"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_type": "user",
"closed_at": null,
"created_at": "2025-01-18T14:51:03+00:00",
"custom_properties": {
"property-tlkudzxmhjkgoktm": "hello"
},
"group_description": null,
"info_admins_only": null,
"invite_link": null,
"is_exited": false,
"is_muted": false,
"label_ids": {
"label-egylglffhfsuzpbu": true,
"label-jolyvzhabwojsrze": true
},
"labels": [
"chatlabel1",
"chatlabel2"
],
"latest_message": {
"ack": "4",
"author": null,
"body": "You have been invited to join Test New 1039\n\nhttps://chat.whatsapp.com/invite/CGiTdfn1dUM8J67GEx1lyx\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": 1737695471721
},
"delivered_count": 1,
"pending": [],
"read": {
"919537851844@c.us": 1737711828823
},
"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/cgitdfn1dum8j67gex1lyx':12 '1039':9 'activ':29 'becom':28 'cannot':15 'chat.whatsapp.com':11 'chat.whatsapp.com/invite/cgitdfn1dum8j67gex1lyx':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": "3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B",
"remote": "919537851844@c.us",
"serialized": "true_919537851844@c.us_3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B"
},
"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_3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B",
"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": "02a54379-36cc-456b-81c4-09074adf9597",
"timestamp": "2025-01-24T05:11:08+00:00",
"to": null,
"token": null,
"unique_id": "3EB0ABB7C973860FC19EBE05FD934141CCEC2D8B",
"updated_at": "2025-01-24T09:43:48.884+00:00",
"vcards": null
},
"member_add_mode": null,
"member_count": 2,
"messages_admins_only": null,
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us",
"updated_at": "2025-01-26T13:05:59.602001+00:00"
}