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

Archive a channel

Archives a public or 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 archiving request.

channel_idstringrequired
The channel to archive.

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

Error handling

The token must carry the admin.conversations:write scope. channel_id must identify the public or private channel to archive.