POST /restrictChatMember

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
until_date Integer No

Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever

chat_id Yes

Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)

permissions Object Yes

Describes actions that a non-administrator user is allowed to take in a chat.

permissions.can_invite_users Boolean No

Optional. True, if the user is allowed to invite new users to the chat

permissions.can_add_web_page_previews Boolean No

Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages

permissions.can_send_other_messages Boolean No

Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages

permissions.can_send_messages Boolean No

Optional. True, if the user is allowed to send text messages, contacts, locations and venues

permissions.can_send_polls Boolean No

Optional. True, if the user is allowed to send polls, implies can_send_messages

permissions.can_change_info Boolean No

Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups

permissions.can_send_media_messages Boolean No

Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages

permissions.can_pin_messages Boolean No

Optional. True, if the user is allowed to pin messages. Ignored in public supergroups

user_id Integer Yes

Unique identifier of the target user

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.