Sample - Slack Web API
POST/conversations.close

Close a direct message conversation

Closes a direct message or multiperson direct message conversation. Provide the conversation channel identifier to close it. The response indicates whether the conversation was already closed or the operation was a no-op.

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

1 parameter · 1 body field
tokenstringoptional
Authentication token with the `conversations:write` scope.

Optional request identifying the direct message conversation to close.

channelstringoptional
Conversation to close.

2 status codes
200Confirms the close operation and may include `already_closed` or `no_op` indicators.
already_closedbooleanoptional
no_opbooleanoptional
okbooleanrequired
Allowed:true
defaultReturned when the conversation type does not support closing, the conversation cannot be found or closed by the authenticated user, or the request is malformed.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:method_not_supported_for_channel_typechannel_not_founduser_does_not_own_channelmissing_scopenot_authedinvalid_authaccount_inactiveinvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_type
neededstringoptional
okbooleanrequired
Allowed:false
providedstringoptional

Error handling

channel must identify a direct message or multiperson direct message conversation that the authenticated user can close. The authentication token must have the conversations:write scope.