Groups · Developer account

addBotToGroup

Add a bot to 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.

Adds the caller's bot to a group the caller is a member of, and creates/opens the bot's group thread. privacy_mode defaults to true when omitted.

Request

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

Parameters

NameTypeRequiredRules
bot_idstringYes-
group_idstringYes-
envstringNo (default 'live')must be 'live' or 'test' when provided
privacy_modebooleanNo (default true)defaults to true when omitted

Response

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

Rate limit: none in code

Errors

StatusErrorWhen
400bot_id and group_id are requiredeither missing
400env must be 'live' or 'test'env not live/test
404bot not foundno such bot, not owned by caller, or deleted
403you are not a member of this groupcaller fails is_group_member check
500could not add bot to groupgroup_bots upsert failed
500could not open bot group threadthread upsert failed