Slack.Web.Admin.Conversations (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Archive a public or private channel.

Archive public or private channels in bulk.

Delete public or private channels in bulk

Move public or private channels in bulk.

Convert a public channel to a private channel.

Convert a private channel to a public channel.

Create a public or private channel-based conversation.

Create a Salesforce channel for the corresponding object provided.

Delete a public or private channel.

Disconnect a connected channel from one or more workspaces.

Get conversation preferences for a public or private channel.

This API endpoint can be used by any admin to get a conversation's retention policy.

Get all the workspaces a given public or private channel is connected to within this Enterprise org.

Invite a user to a public or private channel.

Returns channels on the given team using the filters.

This API endpoint can be used by any admin to remove a conversation's retention policy.

Rename a public or private channel.

Search for public or private channels in an Enterprise organization.

Set the posting permissions for a public or private channel.

This API endpoint can be used by any admin to set a conversation's retention policy.

Set the workspaces in an Enterprise org that connect to a public or private channel.

Unarchive a public or private channel.

Unlink a Salesforce record from a channel

Functions

archive(channel_id, optional_params \\ %{})

Archive a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to archive. ex: C12345

Errors the API can return:

  • already_archived - This channel has already been archived.
  • cant_archive_general - You cannot archive the 'general' channel.
  • channel_not_found - The value passed for channel was invalid.
  • channel_type_not_supported - The value passed for channel was an MPDM, DM, or the 'general' channel.
  • could_not_archive_channel - The provided channel could not be archived.
  • default_org_wide_channel - The default org-wide channel cannot be archived.
  • feature_not_enabled - The token provided does not have access to this method.
  • restricted_action - A workspace preference prevents the authenticated user from archiving this channel.

See the Common Errors guide for errors returned by every Web API method.

bulk_archive(channel_ids, optional_params \\ %{})

Archive public or private channels in bulk.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_ids - An array of channel IDs to archive. No more than 100 items are allowed.

Errors the API can return:

  • action_already_in_progress - Another bulk action request is currently in progress
  • invalid_enterprise - Enterprise does not exist
  • no_valid_channels - All input channels are invalid
  • restricted_action - User does not have permission to perform this action
  • team_not_found - Team ID provided does not exist

See the Common Errors guide for errors returned by every Web API method.

bulk_delete(channel_ids, optional_params \\ %{})

Delete public or private channels in bulk

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_ids - An array of channel IDs.

Errors the API can return:

  • action_already_in_progress - Another bulk action request is currently in progress
  • no_valid_channels - All input channels are invalid
  • restricted_action - User does not have permission to perform this action

See the Common Errors guide for errors returned by every Web API method.

bulk_move(channel_ids, target_team_id, optional_params \\ %{})

Move public or private channels in bulk.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_ids - An array of channel IDs.
  • target_team_id - Target team ID

Errors the API can return:

  • action_already_in_progress - Another bulk action request is currently in progress
  • no_valid_channels - All input channels are invalid
  • restricted_action - User does not have permission to perform this action
  • target_team_not_found - Target team ID provided does not exist
  • team_not_found - Target team cannot be found

See the Common Errors guide for errors returned by every Web API method.

bulk_set_exclude_from_slack_ai(channel_ids, exclude, optional_params \\ %{})

Exclude channels from Slack AI in bulk

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_ids - An array of channel IDs to exclude from Slack AI. ex: ["C12345", "C98765"]
  • exclude - Whether the channels should be excluded from Slack AI. ex: true

Errors the API can return:

  • action_already_in_progress - Another bulk action request is currently in progress
  • feature_not_enabled - The feature is not enabled
  • no_valid_channels - All input channels are invalid
  • restricted_action - User does not have permission to perform this action

See the Common Errors guide for errors returned by every Web API method.

convert_to_private(channel_id, optional_params \\ %{})

Convert a public channel to a private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to convert to private. ex: C12345

Optional Params

  • name - Name of private channel to create. Only respected when converting an MPIM. ex: new_private_channel_name

Errors the API can return:

  • channel_not_found - The value passed for channel was invalid.
  • channel_type_not_supported - The value passed for channel was a DM, MPDM, private, or the 'general' channel.
  • could_not_convert_channel - This channel could not be converted to private.
  • default_org_wide_channel - The default org-wide channel cannot be converted to private.
  • external_channel_migrating - This external channel is migrating, so it can't be converted to private.
  • feature_not_enabled - The provided token doesn't have access to this method.
  • method_not_supported_for_channel_type - This type of conversation cannot be used with this method.
  • name_taken - A private channel cannot be created with the given name.
  • restricted_action - A workspace preference prevents the authenticated user from creating private channels.

See the Common Errors guide for errors returned by every Web API method.

convert_to_public(channel_id, optional_params \\ %{})

Convert a private channel to a public channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to convert to public. ex: C12345

Errors the API can return:

  • channel_not_found - The channel requested for conversion to public could not be found.
  • channel_owner_restriction - away-side SC conversion fails due to home-side being private
  • could_not_convert_channel - This channel could not be converted to public.
  • external_limited_restriction - away-side SC conversion fails due to being under Limited Access (“external_limited” aka “can only post”)
  • feature_not_enabled - The feature has not been enabled for this Organization
  • invalid_user - Value passed for user_id was not valid
  • is_idp_managed - The channel cannot be converted because it is IDP Managed
  • not_an_enterprise - Only enterprises can convert channel to public.
  • not_supported - Conversion to public channel is not supported for this channel.
  • restricted_action - This user is not able to convert this channel to public.

See the Common Errors guide for errors returned by every Web API method.

create(is_private, name, optional_params \\ %{})

Create a public or private channel-based conversation.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • is_private - When true, creates a private channel instead of a public channel ex: true
  • name - Name of the public or private channel to create. ex: mychannel

Optional Params

  • description - Description of the public or private channel to create. ex: It's a good channel, Bront.
  • org_wide - When true, the channel will be available org-wide. Note: if the channel is not org_wide=true, you must specify a team_id for this channel ex: true
  • team_id - The workspace to create the channel in. Note: this argument is required unless you set org_wide=true.

Errors the API can return:

  • could_not_create_channel - The channel could not be created.
  • feature_not_enabled - The token provided doesn't have access to this method.
  • invalid_name - The value passed for name was invalid.
  • invalid_team - The provided workspace is invalid.
  • name_taken - A channel cannot be created with the given name.
  • no_local_user_on_team - The workspace provided had no users.
  • restricted_action - A workspace preference prevents the authenticated user from creating channels.
  • team_id_or_org_required - You must provide a team_id or set org_wide to true.
  • team_not_found - No workspace was found for the team_id provided.

See the Common Errors guide for errors returned by every Web API method.

create_for_objects(object_id, salesforce_org_id, optional_params \\ %{})

Create a Salesforce channel for the corresponding object provided.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • object_id - Object / Record ID (15 or 18 digit accepted). See here for how to look up an ID. ex: 0019000000DmehKAAR
  • salesforce_org_id - Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID. ex: 00DGC00000024hsuWY

Optional Params

  • invite_object_team - Optional flag to add all team members related to the object to the newly created Salesforce channel. When true, adds a maximum of 100 team members to the channel. ex: true

Errors the API can return:

  • channel_already_exists - Object is linked to a different channel.
  • feature_not_enabled - Feature not enabled.
  • invalid_org_id - Value passed for salesforce_org_id is invalid.
  • missing_record_channel_config - Record Channels are not enabled for the given object type.
  • record_not_found - Value passed for object_id is invalid.
  • restricted_action - User does not have access to perform this action.

See the Common Errors guide for errors returned by every Web API method.

delete(channel_id, optional_params \\ %{})

Delete a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to delete. ex: C12345

Errors the API can return:

  • channel_not_found - The value passed for channel_id was invalid.
  • channel_type_not_supported - The provided channel_id was a DM, MPDM, or the 'general' channel.
  • could_not_delete_channel - The channel could not be deleted.
  • default_org_wide_channel - The default org-wide channel cannot be deleted.
  • feature_not_enabled - The token provided doesn't have access to this method.
  • not_an_admin - The token provided is not associated with an Org Owner or Admin.
  • restricted_action - A workspace preference prevents the authenticated user from deleting this channel.

See the Common Errors guide for errors returned by every Web API method.

disconnect_shared(channel_id, optional_params \\ %{})

Disconnect a connected channel from one or more workspaces.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to be disconnected from some workspaces. ex: C12345

Optional Params

  • leaving_team_ids - Used for disconnecting a team from a shared channel. Only one team ID may be passed at a time.

Errors the API can return:

  • cannot_kick_home_team - The originating workspace cannot be kicked from the channel.
  • cannot_kick_team - Only the originating workspace for a connected channel may remove other workspaces from the channel.
  • channel_not_found - The value passed for channel_id was invalid.
  • channel_type_not_supported - The value passed for channel_id was an MPDM, DM, or the 'general' channel.
  • feature_not_enabled - The token provided does not have access to this method.
  • leaving_team_not_in_channel - The workspace being removed is not connected to the channel.
  • leaving_team_required - There are more than two teams in the channel—you must supplied a leaving_team_id parameter.
  • no_teams_to_disconnect - This channel is not shared, so there are no workspaces to disconnect.
  • not_an_admin - The token provided is not associated with an Org Admin or Owner.
  • not_an_enterprise - This endpoint can only be called for an Enterprise organization.
  • not_supported - The passed channel_id was a DM, MPDM, or the 'general' channel.
  • restricted_action - A workspace preference prevents the authenticated user from disconnecting a channel.
  • team_not_found - At least one of the supplied leaving_team_ids are invalid.

See the Common Errors guide for errors returned by every Web API method.

get_conversation_prefs(channel_id, optional_params \\ %{})

Get conversation preferences for a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to get preferences for. ex: C12345

Errors the API can return:

  • channel_not_found - The value passed for channel_id was invalid.
  • channel_type_not_supported - The provided channel_id was a DM, MPDM, or the 'general' channel.
  • could_not_get_conversation_prefs - There was an error getting the conversation preferences for this channel.
  • feature_not_enabled - The token provided does not have access to this method.
  • not_an_admin - The token provided is not associated with an Org Admin or Owner.
  • not_an_enterprise - This endpoint can only be called by an Enterprise organization.
  • restricted_action - A workspace preference prevents the authenticated user from listing preferences.

See the Common Errors guide for errors returned by every Web API method.

get_custom_retention(channel_id, optional_params \\ %{})

This API endpoint can be used by any admin to get a conversation's retention policy.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The conversation to get the retention policy for. ex: C12345678

Errors the API can return:

  • channel_not_found - Value given for channel_id was invalid.
  • channel_type_not_supported - Value given for channel_id was a #general channel.
  • could_not_get_retention - The retention policy could not be retrieved.
  • default_org_wide_channel - The channel given is a default org-wide channel.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • not_an_admin - The token provided is not associated with an org admin.
  • restricted_action - A team preference prevents the authenticated user from modifying the retention policy of this channel.
  • retention_override_not_allowed - The current org retention policy disallows modifying the retention policy of this channel.

See the Common Errors guide for errors returned by every Web API method.

get_teams(channel_id, optional_params \\ %{})

Get all the workspaces a given public or private channel is connected to within this Enterprise org.

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to determine connected workspaces within the organization for. ex: C12345

Optional Params

  • cursor - Set cursor to next_cursor returned by the previous call to list items in the next page ex: 5c3e53d5
  • limit - The maximum number of items to return. Must be between 1 - 1000 both inclusive. ex: 100

Errors the API can return:

  • channel_not_found - The channel wasn't found or isn't connected to multiple workspaces.
  • channel_type_not_supported - The channel_id provided was a DM, MPDM, or the 'general' channel.
  • could_not_get_teams - Could not fetch the workspaces that the channel is shared with in this organization.
  • external_channel_migrating - The channel is actively being migrated
  • feature_not_enabled - The token provided doesn't have access to this method.
  • invalid_cursor - The provided cursor wasn't valid.
  • invalid_limit - The value passed for limit wasn't valid.
  • restricted_action - A workspace preference prevents the authenticated user from listing the workspaces connected to a channel.
  • unsupported_team_type - This endpoint can only called by Enterprise organizations.

See the Common Errors guide for errors returned by every Web API method.

invite(channel_id, user_ids, optional_params \\ %{})

Invite a user to a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel that the users will be invited to. ex: C12345
  • user_ids - The users to invite. ex: U1234,U2345,U3456

Errors the API can return:

  • channel_not_found - The value passed for channel_id was invalid.
  • channel_type_not_supported - The provided channel_id was a DM, MPDM, or the 'general' channel.
  • default_org_wide_channel - Users may not be invited to the default org-wide channel.
  • failed_for_some_users - The method failed for a subset of the users passed.
  • feature_not_enabled - The token provided doesn't have access to this method.
  • restricted_action - A workspace preference prevents the authenticated user from inviting.
  • user_must_be_admin - The token provided must be associated with an Org Admin or Owner.

See the Common Errors guide for errors returned by every Web API method.

lookup(last_message_activity_before, team_ids, optional_params \\ %{})

Returns channels on the given team using the filters.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • last_message_activity_before - Filter by public channels where the most recent message was sent before last_message_activity
  • team_ids - Array of team IDs to filter by

Optional Params

  • cursor - Set cursor to next_cursor returned in the previous call, to fetch the next page.
  • limit - Maximum number of results
  • max_member_count - Filter by public channels with member count equal to or less than the specified number

Errors the API can return:

  • feature_not_enabled - The feature is not enabled
  • invalid_cursor - Value passed for cursor was not valid or is no longer valid.
  • no_valid_teams - The team_ids argument doesn't contain any valid teams

See the Common Errors guide for errors returned by every Web API method.

remove_custom_retention(channel_id, optional_params \\ %{})

This API endpoint can be used by any admin to remove a conversation's retention policy.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The conversation to set the retention policy for. ex: C12345678

Errors the API can return:

  • channel_not_found - Value given for channel_id was invalid.
  • channel_type_not_supported - Value given for channel_id was a #general channel.
  • could_not_remove_retention - The retention policy could not be removed.
  • default_org_wide_channel - The channel given is a default org-wide channel.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • not_an_admin - The token provided is not associated with an admin.
  • restricted_action - A team preference prevents the authenticated user from modifying the retention policy of this channel.
  • retention_override_not_allowed - The current retention policy disallows modifying the retention policy of this channel.

See the Common Errors guide for errors returned by every Web API method.

rename(channel_id, name, optional_params \\ %{})

Rename a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to rename. ex: C12345
  • name -

Errors the API can return:

  • channel_not_found - The value passed for channel_id was invalid.
  • channel_type_not_supported - The provided channel_id was a DM, MPDM, or the 'general' channel.
  • could_not_rename_channel - The channel could not be renamed.
  • default_org_wide_channel - The default org-wide channel can't be renamed.
  • feature_not_enabled - The token provided doesn't have access to this method.
  • invalid_name_maxlength - The channel name exceeds the maximum allowed length.
  • name_taken - The channel's name is already being used elsewhere.
  • restricted_action - A workspace preference prevents the authenticated user from renaming a channel.

See the Common Errors guide for errors returned by every Web API method.

search(optional_params \\ %{})

Search for public or private channels in an Enterprise organization.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Optional Params

  • connected_team_ids - Array of encoded team IDs, signifying the external orgs to search through. ex: ['T00000000','T00000001']
  • cursor - Set cursor to next_cursor returned by the previous call to list items in the next page. ex: dXNlcjpVMEc5V0ZYTlo=
  • limit - Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10. ex: 20
  • query - Name of the the channel to query by. ex: announcement
  • search_channel_types - The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section. ex: private,archived
  • sort - Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted ex: name
  • sort_dir - Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a) ex: asc
  • team_ids - Comma separated string of team IDs, signifying the internal workspaces to search through. ex: T00000000,T00000001
  • total_count_only - Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.

Errors the API can return:

  • connected_team_passed_in_is_not_top_level_team - One of the orgs provided in the external connected teams filter is not a top level team.
  • external_team_not_connected_to_this_org - One of the teams provided in the external connected teams filter is not connected to the org.
  • feature_not_enabled - The token provided doesn't have access to this method.
  • invalid_cursor - The provided cursor is not valid, often due to not urlencoding query parameters.
  • invalid_search_channel_type - An invalid search_channel_types arg was passed. Make sure there are no spaces between your args and that each is one of the enumerated options listed above.
  • invalid_sort - The provided sort argument wasn't valid.
  • invalid_sort_dir - The provided sort_dir argument wasn't valid.
  • not_allowed - The authenticated user does not have the permission to call this method.
  • not_an_admin - The token provided is not associated with an Org Admin or Owner.
  • not_an_enterprise - This endpoint can only be called by an Enterprise organization.
  • team_not_found - One of the workspaces provided in the list wasn't found.

See the Common Errors guide for errors returned by every Web API method.

set_conversation_prefs(channel_id, prefs, optional_params \\ %{})

Set the posting permissions for a public or private channel.

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to set the prefs for ex: C1234
  • prefs - The prefs for this channel in a stringified JSON format. ex: {'who_can_post':'type:admin,user:U1234'}

Errors the API can return:

  • channel_mention_sync_required - If setting channel mention restriction prefs, both mention prefs must be passed and they must be the same value.
  • channel_not_found - Value passed for channel was invalid.
  • channel_type_not_supported - Value given for channel_id was a #general channel.
  • could_not_set_channel_pref - Setting the preference or permission failed.
  • default_org_wide_channel - Returned when you try to modify a default org wide channel.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • invalid_value - Value passed for the preferences are invalid
  • not_an_admin - The token provided is not associated with an org admin.
  • restricted_action - A workspace preference prevents the authenticated user from archiving.

See the Common Errors guide for errors returned by every Web API method.

set_custom_retention(channel_id, duration_days, optional_params \\ %{})

This API endpoint can be used by any admin to set a conversation's retention policy.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The conversation to set the retention policy for. ex: C12345678
  • duration_days - The message retention duration in days to set for this conversation ex: 500

Errors the API can return:

  • channel_not_found - Value given for channel_id was invalid.
  • channel_type_not_supported - Value given for channel_id was a group dm, direct message, or #general channel.
  • could_not_set_retention - The retention policy could not be set.
  • default_org_wide_channel - The channel given is a default org-wide channel.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • invalid_duration - Retention duration_days must be an integer greater than 0 days and less than 36500 days (100 years).
  • not_an_admin - The token provided is not associated with an admin.
  • restricted_action - A team preference prevents the authenticated user from modifying the retention policy of this channel.
  • retention_override_not_allowed - The current retention policy disallows modifying the retention policy of this channel.

See the Common Errors guide for errors returned by every Web API method.

set_teams(channel_id, optional_params \\ %{})

Set the workspaces in an Enterprise org that connect to a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The encoded channel_id to add or remove to workspaces. When used with the team_id parameter, this method sets the requested channel_id as a regular channel on the team_id workspace. When used with the target_team_ids parameter, this method sets the requested channel_id as a cross-workspace shared channel.

Optional Params

  • org_channel - True if channel has to be converted to an org channel ex: true
  • target_team_ids - A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide. When used with the target_team_ids parameter, this method sets the requested channel_id as a cross-workspace shared channel. ex: T1234,T5678,T9012,T3456
  • team_id - The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel. When used with the team_id parameter, this method sets the requested channel_id as a regular channel on the team_id workspace.

Errors the API can return:

  • cannot_add_legacy_disconnected_channel_to_workspaces - Cannot add legacy disconnected channel to workspaces
  • cannot_move_local_channel - This API cannot be used to move a local channel from one workspace to another.
  • channel_cannot_be_unshared - Channel cannot be unshared from this workspace.
  • channel_not_found - The channel wasn't found or isn't shared to this workspace.
  • channel_type_not_supported - The requested channel_id is not a supported type of channel.
  • could_not_set_teams_for_channel - The requested channel_id has not been shared with the target workspace.
  • default_org_wide_channel - Default org wide channel cannot be unshared from a workspace.
  • externally_shared_or_disconnected_channel - The channel is or was externally shared.
  • invalid_channel_id - channel_id was invalid.
  • invalid_target_team - Target workspace is invalid.
  • managed_channel_not_supported - Cannot unshare a managed channel
  • name_taken - The proposed new name for the channel is already in use within your organization.
  • not_allowed_for_grid_workspace - Slack Connect is not allowed for this Enterprise org workspace
  • not_enabled - The API endpoint is not enabled for your team.
  • restricted_action - The caller of this API is not allowed to perform this operation.
  • too_many_target_teams - Too many target_team_ids were provided.
  • unsupported_arguments - The provided method arguments are not supported.

See the Common Errors guide for errors returned by every Web API method.

unarchive(channel_id, optional_params \\ %{})

Unarchive a public or private channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - The channel to unarchive. ex: C12345

Errors the API can return:

  • channel_not_archived - The passed channel is not currently archived.
  • channel_not_found - The value passed for channel_id was invalid.
  • channel_type_not_supported - The value passed for channel was a DM, MPDM, or the 'general' channel
  • could_not_unarchive_channel - The channel could not be unarchived.
  • default_org_wide_channel - You can't unarchive a default org-wide channel.
  • feature_not_enabled - The token provided doesn't have access to this method.
  • restricted_action - A workspace preference prevents the authenticated user from unarchiving.

See the Common Errors guide for errors returned by every Web API method.