POST Moderate chat
Bounce User (ban user from room)
Optionally display a message to people in the room indicating this person was bounced.
Optionally display a message to people in the room indicating this person was bounced.
When you bounce a user from the room, the user is removed from the room and blocked from reentering. Past events generated by that user are not modified (past messages from the user are not removed).
- userid: (required) The ID of the user to bounce from the room.
- bounce: (required, true / false) True if the user is being bounced from the room. False if user is debounced, allowing the user to reenter the room.
- announcement: (optional) If provided, this announcement is displayed to the people who are in the room, as the body of a BOUNCE event.
URL Parameters
- roomid : The ID of the chat room from which to bounce this user.
Request
Parameters
Values in the path and query string.
appid path string TalkLabs ID required
Example: your-app-id roomid path string TalkLabs ID required
Example: room-id Request
JSON body
Send as application/json.
userId string customer-defined required
The customer defined user ID from your application or identity system.
bounce boolean required
announcement string
Request example
{
"bounce": "true",
"announcement": "The bouncer shows dave_m the way out.",
"userId": "u-8842"
} Response
Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 404 Not Found ApiResult 500 Internal Server Error ApiResult