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

Promote a user to admin

Promotes an existing guest, regular user, or owner to an admin user in a workspace. 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 changing a user's workspace role.

team_idstringrequired
The ID (`T1234`) of the workspace.
user_idstringrequired
The ID of the user to designate as an admin.

2 status codes
200Returns an object with `ok` set to true when the user is designated as an admin.
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 whose role you want to change. The token must be an authentication token with the admin.users:write scope.