Sample - Slack Web API
POST/admin.apps.restrict

Restrict an app from workspace installation

Restricts an app from installation on a workspace. Supply the authentication token with the admin.apps:write scope and identify the app or request to restrict using app_id or request_id.

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

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

Form-encoded app restriction details.

app_idstringoptional
The id of the app to restrict.
request_idstringoptional
The id of the request to restrict.
team_idstringoptional
The identifier of the workspace associated with the restriction.

2 status codes
200Returns an object with `ok` set to true when the app restriction succeeds.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false when the app restriction cannot be completed.
okbooleanrequired
Allowed:false

Error handling

The token must carry the admin.apps:write scope. Provide the app_id or request_id for the app restriction request, and include team_id when the restriction applies to a specific workspace.