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

Set a workspace icon

Sets the icon for a workspace. Provide the workspace identifier in team_id and the icon image location in image_url. Authenticate the request with a token that has the admin.teams:write scope.

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

3 body fields

Workspace icon settings submitted as form data.

tokenstringrequired
Authentication token. Requires scope: `admin.teams:write`
image_urlstringrequired
Image URL for the icon
team_idstringrequired
ID for the workspace to set the icon for.

2 status codes
200Returns an object with `ok` set to true when the workspace icon is set.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false when the request cannot be completed.
okbooleanrequired
Allowed:false

Error handling

The request body must include token, image_url, and team_id. token must have the admin.teams:write scope, and image_url must identify the image to use for the workspace icon.