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

View Source

Summary

Functions

Fetch information about settings in a workspace

Set the description of a given workspace.

An API method that allows admins to set the discoverability of a given workspace

Set the name of a given workspace.

Functions

info(team_id, optional_params \\ %{})

Fetch information about settings in a workspace

API reference

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

View on docs.slack.dev ↗

Required Params

  • team_id -

Errors the API can return:

  • failed_to_fetch_info - There was an error fetching info for this workspace.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • team_not_found - The team_id was not found.

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

set_default_channels(channel_ids, team_id, optional_params \\ %{})

Set the default channels of a workspace.

API reference

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

View on docs.slack.dev ↗

Required Params

  • channel_ids - An array of channel IDs.
  • team_id - ID for the workspace to set the default channel for.

Errors the API can return:

  • failed_to_set_default_channels - We encountered an error while trying to set the default channel.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • not_an_admin - This method is only accessible by org owners and admins.
  • one_or_more_invalid_channels - One or more of the passed channel IDs was invalid.
  • restricted_action - The actor does not have admin permissions for the team in context
  • team_not_found - team_id was not found.

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

set_description(description, team_id, optional_params \\ %{})

Set the description of a given workspace.

API reference

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

View on docs.slack.dev ↗

Required Params

  • description - The new description for the workspace.
  • team_id - ID for the workspace to set the description for.

Errors the API can return:

  • failed_to_set_description - There was an error setting the description.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • team_not_found - The requested team_id can't be found.

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

set_discoverability(discoverability, team_id, optional_params \\ %{})

An API method that allows admins to set the discoverability of a given workspace

API reference

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

View on docs.slack.dev ↗

Required Params

  • discoverability - This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
  • team_id - The ID of the workspace to set discoverability on.

Errors the API can return:

  • discoverability_setting_invalid - The discovery setting must be set to one of open, invite_only, closed, or unlisted.
  • failed_to_set_discoverability - There was an error setting the discoverability of this workspace.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • team_not_found - The team_id was not found.

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

set_icon(image_url, team_id, optional_params \\ %{})

Sets the icon of a workspace.

API reference

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

View on docs.slack.dev ↗

Required Params

  • image_url - Image URL for the icon ex: http://mysite.com/icon.jpeg
  • team_id - ID for the workspace to set the icon for.

Errors the API can return:

  • failed_to_set_icon - Setting the url in the database failed. This may be transient, please try again soon.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • invalid_url - Invalid url.
  • not_an_admin - This method is only accessible by org owners and admins.
  • team_not_found - team_id was not found.

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

set_name(name, team_id, optional_params \\ %{})

Set the name of a given workspace.

API reference

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

View on docs.slack.dev ↗

Required Params

  • name - The new name of the workspace.
  • team_id - ID for the workspace to set the name for.

Errors the API can return:

  • failed_to_set_name - Returned when there is an error to set the name
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • team_not_found - Returned when team_id can’t be resolved

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