Sample - Slack Web API
POST/admin.teams.settings.setDefaultChannels

Set a workspace's default channels

Sets the default channels for a workspace. Supply team_id and channel_ids together with an authentication token that has the admin.teams:write scope. The channel_ids value identifies the channels that should be configured as defaults.

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

3 body fields

Workspace default-channel configuration submitted as form data.

tokenstringrequired
Authentication token. Requires scope: `admin.teams:write`
team_idstringrequired
ID for the workspace to set the default channel for.
channel_idsstringrequired
An array of channel IDs.

2 status codes
200Returns a successful response with `ok` set to true.
okbooleanrequired
Allowed:true
defaultReturns the standard failure response with `ok` set to false.
okbooleanrequired
Allowed:false

Error handling

token, team_id, and channel_ids must all be provided in the request body. token must carry the admin.teams:write scope, and channel_ids must contain an array of channel identifiers.