Skip to content

Set Disappearing Chat#

The method is aimed for changing settings of disappearing messages in chats. The standard settings of the application are to be used: 0 (off), 86400 (24 hours), 604800 (7 days), 7776000 (90 days).


To set settings, you have to execute a request at:


For idInstance and apiTokenInstance request parameters, refer to Before you start section.

Request parameters#

Parameter Type Mandatory Description
chatId string Yes Correspondent id
ephemeralExpiration integer No Messages lifetime in seconds, takes on the values: 0, 86400, 604800, 7776000

Request body example#

    "chatId": "",
    "ephemeralExpiration": 0


Response parameters#

Parameter Type Description
chatId string yes
disappearingMessagesInChat boolean Chat state (disappearing or plain), takes on the values: true, false
ephemeralExpiration integer Messages lifetime in chats, takes on the values: 0, 86400, 604800, 7776000

Response body example#

    "chatId": "",
    "disappearingMessagesInChat": false,
    "ephemeralExpiration": 0

SetDisappearingChat errors#

For a list of errors common to all methods, refer to Common errors

Python request example#

import requests
import json

url = "{{idInstance}}/setDisappearingChat/{{apiTokenInstance}}
payload = json.dumps({
  "chatId": "",
  "ephemeralExpiration": 0
headers = {
  'Content-Type': 'application/json'

response = requests.request("POST", url, headers=headers, data=payload)