Slack Users API

The Users API from Slack — 32 operation(s) for users.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

slack-users-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '1.0'
  title: Slack Admin Access Users API
  description: "The Slack Admin API is a set of privileged endpoints\x14primarily under admin.* with related SCIM and Audit Logs APIs\x14that lets Enterprise Grid owners and admins automate organization\x11 wide management and governance. It covers user lifecycle (provision, suspend, assign roles), workspace and channel administration across workspaces (create, move, archive channels; manage membership and settings), app governance (approve/deny or allowlist/ban apps and install them to workspaces), invite request handling, and security/compliance controls such as information barriers, session and authentication policies, and org\x11level analytics exports. These APIs require elevated admin scopes and are commonly used to power automated onboarding/offboarding, centralized channel and app controls, and integrations with identity, ITSM, and compliance systems."
tags:
- name: Users
paths:
  /admin.users.assign:
    post:
      tags:
      - Users
      description: Add an Enterprise user to a workspace.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.assign
      operationId: postAdminUsersAssign
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to add to the workspace.
                is_restricted:
                  type: boolean
                  description: True if user should be added to the workspace as a guest.
                is_ultra_restricted:
                  type: boolean
                  description: True if user should be added to the workspace as a single-channel guest.
                channel_ids:
                  type: string
                  description: Comma separated values of channel IDs to add user in the new workspace.
          application/json:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to add to the workspace.
                is_restricted:
                  type: boolean
                  description: True if user should be added to the workspace as a guest.
                is_ultra_restricted:
                  type: boolean
                  description: True if user should be added to the workspace as a single-channel guest.
                channel_ids:
                  type: string
                  description: Comma separated values of channel IDs to add user in the new workspace.
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Assign
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.invite:
    post:
      tags:
      - Users
      description: Invite a user to a workspace.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.invite
      operationId: postAdminUsersInvite
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - channel_ids
              - email
              - team_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                email:
                  type: string
                  description: The email address of the person to invite.
                channel_ids:
                  type: string
                  description: A comma-separated list of `channel_id`s for this user to join. At least one channel is required.
                custom_message:
                  type: string
                  description: An optional message to send to the user in the invite email.
                real_name:
                  type: string
                  description: Full name of the user.
                resend:
                  type: boolean
                  description: 'Allow this invite to be resent in the future if a user has not signed up yet. (default: false)'
                is_restricted:
                  type: boolean
                  description: 'Is this user a multi-channel guest user? (default: false)'
                is_ultra_restricted:
                  type: boolean
                  description: 'Is this user a single channel guest user? (default: false)'
                guest_expiration_ts:
                  type: string
                  description: Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date.
          application/json:
            schema:
              required:
              - channel_ids
              - email
              - team_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                email:
                  type: string
                  description: The email address of the person to invite.
                channel_ids:
                  type: string
                  description: A comma-separated list of `channel_id`s for this user to join. At least one channel is required.
                custom_message:
                  type: string
                  description: An optional message to send to the user in the invite email.
                real_name:
                  type: string
                  description: Full name of the user.
                resend:
                  type: boolean
                  description: 'Allow this invite to be resent in the future if a user has not signed up yet. (default: false)'
                is_restricted:
                  type: boolean
                  description: 'Is this user a multi-channel guest user? (default: false)'
                is_ultra_restricted:
                  type: boolean
                  description: 'Is this user a single channel guest user? (default: false)'
                guest_expiration_ts:
                  type: string
                  description: Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date.
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Invite
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.list:
    get:
      tags:
      - Users
      description: List users on a workspace
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.list
      operationId: getAdminUsersList
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:read`'
        required: true
        schema:
          type: string
      - name: team_id
        in: query
        description: The ID (`T1234`) of the workspace.
        required: true
        schema:
          type: string
      - name: cursor
        in: query
        description: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit for how many users to be retrieved per page
        schema:
          type: integer
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
                users:
                - email: bront@slack.com
                  id: T1234
                  is_admin: false
                  is_bot: false
                  is_owner: false
                  is_primary_owner: false
                  is_restricted: false
                  is_ultra_restricted: false
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:read
      summary: Slack Get Admin Users List
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.remove:
    post:
      tags:
      - Users
      description: Remove a user from a workspace.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.remove
      operationId: postAdminUsersRemove
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to remove.
          application/json:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to remove.
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Remove
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.session.invalidate:
    post:
      tags:
      - Users
      description: Invalidate a single session for a user by session_id
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.session.invalidate
      operationId: postAdminUsersSessionInvalidate
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - session_id
              - team_id
              type: object
              properties:
                team_id:
                  type: string
                  description: ID of the team that the session belongs to
                session_id:
                  type: integer
                  format: int32
          application/json:
            schema:
              required:
              - session_id
              - team_id
              type: object
              properties:
                team_id:
                  type: string
                  description: ID of the team that the session belongs to
                session_id:
                  type: integer
                  format: int32
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Session Invalidate
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.session.reset:
    post:
      tags:
      - Users
      description: Wipes all valid sessions on all devices for a given user
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.session.reset
      operationId: postAdminUsersSessionReset
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - user_id
              type: object
              properties:
                user_id:
                  type: string
                  description: The ID of the user to wipe sessions for
                mobile_only:
                  type: boolean
                  description: 'Only expire mobile sessions (default: false)'
                web_only:
                  type: boolean
                  description: 'Only expire web sessions (default: false)'
          application/json:
            schema:
              required:
              - user_id
              type: object
              properties:
                user_id:
                  type: string
                  description: The ID of the user to wipe sessions for
                mobile_only:
                  type: boolean
                  description: 'Only expire mobile sessions (default: false)'
                web_only:
                  type: boolean
                  description: 'Only expire web sessions (default: false)'
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Session Reset
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.setAdmin:
    post:
      tags:
      - Users
      description: Set an existing guest, regular user, or owner to be an admin user.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.setAdmin
      operationId: postAdminUsersSetadmin
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to designate as an admin.
          application/json:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to designate as an admin.
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Setadmin
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.setExpiration:
    post:
      tags:
      - Users
      description: Set an expiration for a guest user
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.setExpiration
      operationId: postAdminUsersSetexpiration
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - expiration_ts
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to set an expiration for.
                expiration_ts:
                  type: integer
                  description: Timestamp when guest account should be disabled.
                  format: int32
          application/json:
            schema:
              required:
              - expiration_ts
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: The ID of the user to set an expiration for.
                expiration_ts:
                  type: integer
                  description: Timestamp when guest account should be disabled.
                  format: int32
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Setexpiration
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.setOwner:
    post:
      tags:
      - Users
      description: Set an existing guest, regular user, or admin user to be a workspace owner.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.setOwner
      operationId: postAdminUsersSetowner
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `admin.users:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: Id of the user to promote to owner.
          application/json:
            schema:
              required:
              - team_id
              - user_id
              type: object
              properties:
                team_id:
                  type: string
                  description: The ID (`T1234`) of the workspace.
                user_id:
                  type: string
                  description: Id of the user to promote to owner.
        required: true
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - admin.users:write
      summary: Slack Post Admin Users Setowner
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin.users.setRegular:
    post:
      tags:
      - Users
      description: Set an existing guest user, admin user, or owner to be a regular user.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/admin.users.setRegular
      operationId: postAdminUsersSetregular
      parameters:
      - name: token
        in: header
       

# --- truncated at 32 KB (130 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-users-api-openapi.yml