Sample - Slack Web API
POST/admin.conversations.convertToPrivate

Convert a channel to private

Converts a public channel to a private channel. Supply channel_id in the form body and authenticate with a token that has the admin.conversations:write scope.

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

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

Form-encoded channel conversion request.

channel_idstringrequired
The channel to convert to private.

2 status codes
200Returns an object with `ok` set to true when the channel is converted.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false and an `error` value describing why the channel could not be converted.
errorstringrequired
Allowed:feature_not_enabledrestricted_actionname_takenchannel_not_foundchannel_type_not_supporteddefault_org_wide_channelmethod_not_supported_for_channel_typecould_not_convert_channelexternal_channel_migrating
okbooleanrequired
Allowed:false

Error handling

The token must carry the admin.conversations:write scope. channel_id must identify a public channel that can be converted to private.