Omnichannel

Security and Compliance

Muting or Unmuting Telegram Notifications for Users

In some instances, you need to mute broadcasts for Telegram users having a dialog with the bot or an operator to avoid interruptions. And when required, the messaging shall be unmuted. 

In our platform, these can be done for users with Telegram tokens. The feature is implemented through two API endpoints described below.

Muting Notifications

To mute notifications, send requests to the following endpoint: 

  • POST /v1/apps/{app_uuid}/token/mute

Note

Muted users or chats can receive transactional messages (smartsend, test).

The method’s parameters and their description are given in the following table.

Parameter Type Description
token string

Required.

User’s Telegram token.

duration long

Optional.

Mute duration in seconds:

  • The minimum value is 5 seconds. 
  • The maximum value is 31,536,000 seconds (approximately 1 year).

If the duration is not specified, mute is set to 9999-12-31 23:59:59, disabling notifications "forever".

To change the mute duration, send another request with the new value.

The response may return the following errors listed in the table.

Status Error Message
400 Wrong app uuid
400 Tokens must be specified
400 Duration must be positive int
404 Not registered application

The muted contacts in the campaign reports are shown as Unavailable contacts with Other errors as the error type.

Muted contacts in ReportsThe error name in the details is CHANNEL_WAS_MUTED.

Error name

Unmuting Notifications

To unmute notifications, send requests to the following endpoint:

  • POST /v1/apps/{app_uuid}/token/unmute

The request must contain the following parameter:

Parameter Type Description
token string

Required.

User’s Telegram token.

The response may return the following errors listed in the table.

Status Error Message
400 Wrong app uuid
400 Tokens must be specified
404 Not registered application
Any Questions?
We’re always happy to help!
Discount services
Schedule a Call
Fill in the form, and our specialists will call you back as soon as possible.
Discount services
Chat Support
We’re waiting for your questions!
Discount services
Email
Contact the support team