Slack icon

Slack

Send messages, manage channels, list users, and interact with Slack workspaces via the Slack Web API.

OFFICIALBEARER0 INSTALLS
API Docs
OpenAPI Specificationv3.0.3
{
  "openapi": "3.0.3",
  "info": {
    "title": "Slack Web API",
    "version": "1.0.0",
    "description": "Slack is a team messaging and collaboration platform. Use this API to send messages to channels, list available channels in a workspace, and retrieve workspace member information. Supports posting formatted messages, browsing channel directories, and looking up user profiles."
  },
  "servers": [
    {
      "url": "https://slack.com/api"
    }
  ],
  "paths": {
    "/chat.postMessage": {
      "post": {
        "operationId": "chatPostMessage",
        "summary": "Send a message",
        "description": "Send a message to a Slack channel, DM, or group conversation. Use this to post notifications, alerts, updates, or any text communication to a Slack workspace. Supports plain text, Slack's mrkdwn formatting (bold, italic, links, code blocks), and rich Block Kit layouts. Returns the posted message object with its timestamp ID, which can be used to update or reply to the message.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channel",
                  "text"
                ],
                "properties": {
                  "channel": {
                    "type": "string",
                    "description": "The channel, DM, or group conversation to send the message to. Use a channel ID (e.g. 'C024BE91L') or channel name (e.g. '#general'). For DMs, use the user's ID (e.g. 'U024BE7LH'). Use conversationsList to find channel IDs."
                  },
                  "text": {
                    "type": "string",
                    "description": "The message text content. Supports Slack mrkdwn formatting: *bold*, _italic_, `code`, ```code blocks```, <url|link text>, and @mentions. Also used as the notification text and fallback for Block Kit messages."
                  },
                  "thread_ts": {
                    "type": "string",
                    "description": "The timestamp of a parent message to reply to, creating a threaded reply. Use the 'ts' field from a previous message. Omit to post as a top-level message."
                  },
                  "unfurl_links": {
                    "type": "boolean",
                    "description": "Whether to show URL previews/unfurls for links in the message. Defaults to true for most URLs.",
                    "default": true
                  },
                  "blocks": {
                    "type": "array",
                    "description": "An array of Block Kit layout blocks for rich message formatting. Supports sections, dividers, images, actions, and more. When provided, 'text' is used as the fallback/notification text.",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A response object with ok (boolean), channel (ID where message was posted), ts (message timestamp ID — use this to reply, update, or delete the message), and the full message object."
          }
        }
      }
    },
    "/conversations.list": {
      "get": {
        "operationId": "conversationsList",
        "summary": "List channels",
        "description": "Retrieve a paginated list of channels in the Slack workspace. Use this to discover available channels, find a channel ID by name, or browse the channel directory. Returns channel objects with name, topic, purpose, member count, and whether the bot is a member. By default returns public channels only.",
        "parameters": [
          {
            "name": "types",
            "in": "query",
            "description": "Comma-separated list of channel types to include. Options: 'public_channel', 'private_channel', 'mpim' (group DM), 'im' (direct message). Defaults to 'public_channel'. Example: 'public_channel,private_channel'.",
            "schema": {
              "type": "string",
              "default": "public_channel"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of channels to return per page (1-1000). Defaults to 100. Use with cursor for pagination through large workspaces.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "A pagination cursor from a previous response's response_metadata.next_cursor. Use this to fetch the next page of channels.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_archived",
            "in": "query",
            "description": "Set to true to exclude archived channels from results. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A response object with ok (boolean) and channels array. Each channel includes id, name, is_channel, is_private, is_archived, topic, purpose, num_members, and is_member. Response includes response_metadata.next_cursor for pagination."
          }
        }
      }
    },
    "/users.list": {
      "get": {
        "operationId": "usersList",
        "summary": "List users",
        "description": "Retrieve a paginated list of all users in the Slack workspace. Use this to look up user profiles, find a user's ID by name or email, check who is in the workspace, or get user display names and avatars. Returns user objects with profile details, status, timezone, and admin flags.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of users to return per page (1-1000). Defaults to 100. Use with cursor for pagination.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "A pagination cursor from a previous response's response_metadata.next_cursor. Use this to fetch the next page of users.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_locale",
            "in": "query",
            "description": "Set to true to include the user's locale/language in the response.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A response object with ok (boolean) and members array. Each user includes id, name, real_name, profile (email, display_name, image URLs, status_text), is_admin, is_bot, tz (timezone), deleted, and updated timestamp. Response includes response_metadata.next_cursor for pagination."
          }
        }
      }
    }
  }
}