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

Remove a user from a workspace

Removes a user from a workspace. Provide the workspace identifier in team_id and the user identifier in user_id to identify the membership to remove. Authenticate with a token that has the admin.users:write scope.

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

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

Workspace user removal details submitted as form data.

team_idstringrequired
The ID (`T1234`) of the workspace.
user_idstringrequired
The ID of the user to remove.

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

Error handling

The request must include team_id and user_id. token must have the admin.users:write scope, and the identifiers must identify the workspace membership to remove.