Sample - Slack Web API
POST/conversations.archive

Archive a conversation

Archives a conversation so it is no longer active. Provide the conversation channel identifier for the conversation you want to archive. The operation returns a success confirmation when the archive is applied.

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

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

Optional conversation archive request containing the conversation identifier.

channelstringoptional
ID of conversation to archive

2 status codes
200Confirms that the conversation was archived successfully.
okbooleanrequired
Allowed:true
defaultReturned when the conversation type does not support archiving, the conversation cannot be found or is already archived, or authentication or permissions are insufficient.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:method_not_supported_for_channel_typemissing_scopenot_supportedchannel_not_foundalready_archivedcant_archive_generalrestricted_actionnot_authedinvalid_authaccount_inactiveuser_is_botuser_is_restricted
neededstringoptional
okbooleanrequired
Allowed:false
providedstringoptional

Error handling

channel must identify the conversation to archive, and the authentication token must have the conversations:write scope. The conversation must support archiving and must not already be archived.