Groups · Developer account

setPrivacyMode

Set a bot's privacy mode in a group

This method authenticates with your developer account. The easiest way to call it is the dashboard, which signs the request for you. Direct calls need a dashboard session cookie.

Sets group privacy mode for a bot that is already in the group. Privacy mode controls whether the bot sees all group messages or only ones addressed to it (enforced in bot-ingest).

Request

curl https://api.sprintelex.com/setPrivacyMode \
  # authenticated with your dashboard session \
  -H "Content-Type: application/json" \
  -d '{"bot_id":"<bot-id>","group_id":"<group-id>","privacy_mode":true}'

Parameters

NameTypeRequiredRules
bot_idstringYes-
group_idstringYes-
privacy_modebooleanYesmust be a boolean, not a truthy string

Response

{ ok: true, result: { group_id, privacy_mode } }

Rate limit: none in code

Errors

StatusErrorWhen
400bot_id and group_id are requiredeither missing
400privacy_mode must be true or falsenot a boolean
404bot not foundno such bot, not owned by caller, or deleted
404bot is not in that groupno group_bots row for this bot+group