Sample - Slack Web API
POST/conversations.kick

Remove a user from a conversation

Removes a user from an existing conversation. Provide the conversation in channel and the user to remove in user, using an authentication token with the conversations:write scope when authorization is required.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 2 body fields
tokenstringoptional
Authentication token for the request; it must provide the `conversations:write` scope.

Optional form-encoded details identifying the conversation and user.

channelstringoptional
ID of conversation to remove user from.
userstringoptional
User ID to be removed.

2 status codes
200Returns a success object with `ok` set to true.
okbooleanrequired
Allowed:true
defaultTypical error response when you attempt to kick yourself from a channel
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:method_not_supported_for_channel_typemissing_scopechannel_not_founduser_not_foundcant_kick_selfnot_in_channelcant_kick_from_generalrestricted_actionnot_authedinvalid_authaccount_inactiveuser_is_bot
neededstringoptional
okbooleanrequired
Allowed:false
providedstringoptional

Error handling

channel must identify an existing conversation and user must identify the user to remove. The token must provide the conversations:write scope when supplied for authentication.