Skip to main content
Register now for TDX! Join the must-attend event to experience what’s next and learn how to build it.

Get to Know the Admin and Audit Logs APIs

Learning Objectives

After completing this unit, you’ll be able to:

  • Recommend when you can automate Slack workspace and org administration tasks with Admin API.
  • Explain the functionality, use cases, and limitations of each set of admin API methods.

Automate with Admin API

Slack admins configure workspaces to ensure proper access and policies. In Enterprise Grid orgs, admins manage permissions, app approvals, workspace creation, default channels, session resets, guest invites, and more. As organizations scale, these routine tasks become repetitive and time-consuming. The good news is, you can build apps to automate these admin workflows and save time.

Admin API is a suite of web API methods (prefixed with admin.) that automate Slack management tasks in Enterprise orgs. They use standard authentication and rate-limiting but require admin-level scopes. Most features are Enterprise Grid exclusive (with some on Enterprise Select and Business+), and Grid installations must be at the org level. With admin APIs, you can automate app management, workspace creation, invites, and more‌—often combining multiple use cases in a single app.

App Management

Manage App Approvals

[Alt Text: App Management Instructions.]

Most Enterprise Grid workspaces require app approval before installation. While workspace owners can install apps by default, policies often mandate approval via Slackbot or designated channels, integrating with internal review processes for security and compliance.

The admin.apps.* API methods and app_requested event enable automated approval workflows. Org owners can set rules‌—like scope permissions and allow/deny lists‌—to auto-approve or reject requests, streamlining management across workspaces. Admins can cancel unresolved requests to prevent backlogs, and all stakeholders receive message updates. When developers add new scopes to approved apps, Slack prompts reapproval to maintain oversight before deploying expanded permissions.

Note

Caution

Work closely with your admin team. Installing an app with admin.apps:write disables the workspace-level App Management Settings UI‌—all approvals and restrictions must then go through the app. To restore the UI, revoke the app's token or uninstall it entirely.

Workspace Management

Manage Invite Requests

Workspace Management.

Like apps, guest invites may require admin approval. Subscribe to the invite_requested event and use admin.inviteRequests.* methods to approve or deny requests. Automate approval for known vendors using these APIs.

Control User Role Assignments

Programmatically manage Enterprise Grid admin roles using the role assignments APIs. Retrieve, add, or remove system roles for users on specific entities (orgs, workspaces, channels) by any combination of roles or entities.

Account Reset Message.

Reset User Sessions Programmatically

For security situations like lost devices, use the admin.users.session.reset API (requires admin.users:write) or the Enterprise Grid Admin Dashboard to reset user sessions. Choose to sign out from mobile, desktop, or both. Note: Individual session resets aren't supported.

Note

Recommended reading:

Learn more about the Admin API method related to resetting sessions.

Create a new Workspace.

Programmatically Create and Invite Users to Workspaces

Organizations can use admin.teams.create and related APIs to programmatically create workspaces, manage users (invite/assign/remove/promote to Owner/Admin), list owners/admins, and modify settings like name and visibility.

Note

Recommended reading:

Learn more about the Admin API methods for creating and managing workspaces at scale.

Perform Bulk Channel Lifecycle Management

Manage channel lifecycle at scale using bulk channel action APIs to archive, delete, or move multiple channels to another workspace simultaneously.

Manage Custom Retention Period for Conversations

Slack retains messages indefinitely by default in paid workspaces. Owners can adjust retention for individual conversations via UI, or org admins can use conversation retention APIs to retrieve, configure, or remove custom periods. This enables granular compliance policies for different countries, roles, or projects.

Set Allowlists for Private Channels

By default, private channels allow any member within the channel to invite other users into the private channel. By automating allowlists for private channels using the admin.conversations.restrictAccess.* API methods, an admin can allow members of certain identity provider (IdP) groups to be invited to specific private channels. More about IdPs and Slack in the next unit.

Retrieve Member and Public Channel Analytics

Use the admin analytics API to retrieve member and public channel metadata and engagement data (excludes archived, deleted, and private channels). The compressed JSON response provides more fields than the analytics dashboard export for greater flexibility. Available on Enterprise and Business+ plans.

Let’s Recap

You’ve learned how you can use admin API methods to automate Slack workspace and organization administration tasks. You’ve also explored some use cases and limitations to effectively using these powerful tools. Next, take a look at SCIM for managing users.

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios