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
| Name | Type | Required | Rules |
|---|---|---|---|
| bot_id | string | Yes | - |
| group_id | string | Yes | - |
| env | string | No (default 'live') | must be 'live' or 'test' when provided |
| privacy_mode | boolean | No (default true) | defaults to true when omitted |
Response
{ ok: true, result: { thread_id, privacy_mode } }Rate limit: none in code
Errors
| Status | Error | When |
|---|---|---|
| 400 | bot_id and group_id are required | either missing |
| 400 | env must be 'live' or 'test' | env not live/test |
| 404 | bot not found | no such bot, not owned by caller, or deleted |
| 403 | you are not a member of this group | caller fails is_group_member check |
| 500 | could not add bot to group | group_bots upsert failed |
| 500 | could not open bot group thread | thread upsert failed |