Sample - Slack Web API
POST/admin.users.setOwner

Promote a user to workspace owner

Promotes an existing guest, regular user, or admin user to workspace owner. Supply team_id and user_id to identify the workspace and user whose role you want to change. The authenticated user must provide an administrative token with the required write scope.

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

1 parameter · 2 body fields
tokenstringrequired
Authentication token with the `admin.users:write` scope.

Form-encoded identifiers for promoting a user to workspace owner.

team_idstringrequired
The ID (`T1234`) of the workspace.
user_idstringrequired
Id of the user to promote to owner.

2 status codes
200Returns an object with `ok` set to true when the user becomes a workspace owner.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false when the role change does not complete successfully.
okbooleanrequired
Allowed:false

Error handling

team_id and user_id are required and must identify the workspace and user to promote. The token must be an authentication token with the admin.users:write scope.