admin.teams.*: create and list the workspaces in an Enterprise organization, list their admins and owners, and change workspace settings (name, description, icon, discoverability, default channels).

Example

::teams ::slack::admin::teams

workspaces ::teams/list-all(::teams/ListRequest({}), 500)
map(workspaces, (t) { t.name })

Functions

admins-list

fn (request: AdminsListRequest): Map
fn (request: AdminsListRequest, opts: Map): Map

admin.teams.admins.list - List a workspace's admins (admin_ids).

Scope: admin.teams:read. Returns Slack's response body; ok: false comes back as an Err(SlackError). Cursor-paginated: pass cursor from response_metadata.next_cursor, or use admins-list-all.

admins-list-all

fn (request: AdminsListRequest): Vec
fn (request: AdminsListRequest, max-items: Int): Vec
fn (request: AdminsListRequest, max-items: Int, opts: Map): Vec

Every admin_ids entry from admin.teams.admins.list, following next_cursor until the last page or max-items (default 1000). request sets the filters; its cursor is the starting point.

create

fn (request: CreateRequest): Map
fn (request: CreateRequest, opts: Map): Map

admin.teams.create - Create a workspace. team_discoverability: open, closed, invite_only or unlisted. Returns team (the new team id).

Scope: admin.teams:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

list

fn (): Map
fn (request: ListRequest): Map
fn (request: ListRequest, opts: Map): Map

admin.teams.list - List every workspace in the organization (teams).

Scope: admin.teams:read. Returns Slack's response body; ok: false comes back as an Err(SlackError). Cursor-paginated: pass cursor from response_metadata.next_cursor, or use list-all.

list-all

fn (): Vec
fn (request: ListRequest): Vec
fn (request: ListRequest, max-items: Int): Vec
fn (request: ListRequest, max-items: Int, opts: Map): Vec

Every teams entry from admin.teams.list, following next_cursor until the last page or max-items (default 1000). request sets the filters; its cursor is the starting point.

owners-list

fn (request: OwnersListRequest): Map
fn (request: OwnersListRequest, opts: Map): Map

admin.teams.owners.list - List a workspace's owners (owner_ids).

Scope: admin.teams:read. Returns Slack's response body; ok: false comes back as an Err(SlackError). Cursor-paginated: pass cursor from response_metadata.next_cursor, or use owners-list-all.

owners-list-all

fn (request: OwnersListRequest): Vec
fn (request: OwnersListRequest, max-items: Int): Vec
fn (request: OwnersListRequest, max-items: Int, opts: Map): Vec

Every owner_ids entry from admin.teams.owners.list, following next_cursor until the last page or max-items (default 1000). request sets the filters; its cursor is the starting point.

settings-info

fn (request: SettingsInfoRequest): Map
fn (request: SettingsInfoRequest, opts: Map): Map

admin.teams.settings.info - Get a workspace's settings (team).

Scope: admin.teams:read. Returns Slack's response body; ok: false comes back as an Err(SlackError).

settings-set-default-channels

fn (request: SettingsSetDefaultChannelsRequest): Map
fn (request: SettingsSetDefaultChannelsRequest, opts: Map): Map

admin.teams.settings.setDefaultChannels - Set the channels new members join automatically.

Scope: admin.teams:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

settings-set-description

fn (request: SettingsSetDescriptionRequest): Map
fn (request: SettingsSetDescriptionRequest, opts: Map): Map

admin.teams.settings.setDescription - Set a workspace's description.

Scope: admin.teams:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

settings-set-discoverability

fn (request: SettingsSetDiscoverabilityRequest): Map
fn (request: SettingsSetDiscoverabilityRequest, opts: Map): Map

admin.teams.settings.setDiscoverability - Set who can find and join a workspace: open, closed, invite_only or unlisted.

Scope: admin.teams:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

settings-set-icon

fn (request: SettingsSetIconRequest): Map
fn (request: SettingsSetIconRequest, opts: Map): Map

admin.teams.settings.setIcon - Set a workspace's icon from an image URL.

Scope: admin.teams:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

settings-set-name

fn (request: SettingsSetNameRequest): Map
fn (request: SettingsSetNameRequest, opts: Map): Map

admin.teams.settings.setName - Rename a workspace.

Scope: admin.teams:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

Types

AdminsListRequest

AdminsListRequest type {
    team_id: Str,
    cursor: Str?,
    limit: Int?
}

CreateRequest

CreateRequest type {
    team_domain: Str,
    team_name: Str,
    team_description: Str?,
    team_discoverability: Str?
}

ListRequest

ListRequest type {
    cursor: Str?,
    limit: Int?
}

OwnersListRequest

OwnersListRequest type {
    team_id: Str,
    cursor: Str?,
    limit: Int?
}

SettingsInfoRequest

SettingsInfoRequest type {
    team_id: Str
}

SettingsSetDefaultChannelsRequest

SettingsSetDefaultChannelsRequest type {
    team_id: Str,
    channel_ids: Vec<Str>
}

SettingsSetDescriptionRequest

SettingsSetDescriptionRequest type {
    team_id: Str,
    description: Str
}

SettingsSetDiscoverabilityRequest

SettingsSetDiscoverabilityRequest type {
    team_id: Str,
    discoverability: Str
}

SettingsSetIconRequest

SettingsSetIconRequest type {
    team_id: Str,
    image_url: Str
}

SettingsSetNameRequest

SettingsSetNameRequest type {
    team_id: Str,
    name: Str
}