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

View Source

Summary

Functions

List all teams in an Enterprise organization

Functions

create(team_domain, team_name, optional_params \\ %{})

Create an Enterprise team.

API reference

Rate limit: Tier 1: 1+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • team_domain - Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.
  • team_name - Team name (for example, Slack Softball Team).

Optional Params

  • team_description - Description for the team.
  • team_discoverability - Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted.

Errors the API can return:

  • bad_url - Invalid URL. Note that domains can be at most 21 characters.
  • could_not_create_workspace - The workspace could not be created.
  • discoverability_setting_invalid - The given discoverability setting is invalid.
  • domain_taken - The requested domain is taken.
  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • must_provide_team_domain - No team domain has been provided.
  • must_provide_team_name - No team name has been provided.
  • name_taken_in_org - The team with the specified name already exists in the org.
  • not_an_admin - This method is only accessible by org owners and admins.

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

list(optional_params \\ %{})

List all teams in an Enterprise organization

API reference

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

View on docs.slack.dev ↗

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 a positive integer no larger than 1000. ex: 50

Errors the API can return:

  • feature_not_enabled - The Admin APIs feature is not enabled for this team.
  • invalid_cursor - Invalid cursor.
  • invalid_limit - Value passed for limit was not valid.
  • not_an_admin - This method is only accessible by org owners and admins.

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