Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/guides/installing-the-slack-cli-for-mac-and-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ Manual installation allows you to customize certain paths used when installing t

**2\. Download the** `slack` **CLI installer for your environment.**

🍎 ⚡️ [**Download for macOS Apple Silicon (.tar.gz)**](https://downloads.slack-edge.com/slack-cli/slack_cli_4.0.1_macOS_arm64.tar.gz)
🍎 ⚡️ [**Download for macOS Apple Silicon (.tar.gz)**](https://downloads.slack-edge.com/slack-cli/slack_cli_4.1.0_macOS_arm64.tar.gz)

🍏 🪨 [**Download for macOS Intel (.tar.gz)**](https://downloads.slack-edge.com/slack-cli/slack_cli_4.0.1_macOS_amd64.tar.gz)
🍏 🪨 [**Download for macOS Intel (.tar.gz)**](https://downloads.slack-edge.com/slack-cli/slack_cli_4.1.0_macOS_amd64.tar.gz)

🐧 💾 [**Download for Linux (.tar.gz)**](https://downloads.slack-edge.com/slack-cli/slack_cli_4.0.1_linux_64-bit.tar.gz)
🐧 💾 [**Download for Linux (.tar.gz)**](https://downloads.slack-edge.com/slack-cli/slack_cli_4.1.0_linux_64-bit.tar.gz)

**3\. Add the** `slack` **CLI to your path.**

Expand All @@ -121,7 +121,7 @@ We recommend using an alias if another `slack` binary exists. To do this, change

```sh
$ slack version
Using slack v4.0.1
Using slack v4.1.0
```

</TabItem>
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/installing-the-slack-cli-for-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Manual installation allows you to customize certain paths used when installing t

**2\. Download the** `slack` **CLI installer for your environment.**

<ts-icon class="ts_icon_windows"></ts-icon> &nbsp; <a href="https://downloads.slack-edge.com/slack-cli/slack_cli_4.0.1_windows_64-bit.zip"><strong>Windows (.zip)</strong></a>
<ts-icon class="ts_icon_windows"></ts-icon> &nbsp; <a href="https://downloads.slack-edge.com/slack-cli/slack_cli_4.1.0_windows_64-bit.zip"><strong>Windows (.zip)</strong></a>

**3\. Add the** `slack` **CLI to your path.**

Expand All @@ -118,7 +118,7 @@ We recommend using an alias if another `slack` binary exists. To do this, change

```pwsh
$ slack version
Using slack v4.0.1
Using slack v4.1.0
```

</TabItem>
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/commands/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ slack <command> <subcommand> [flags]
## Flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand All @@ -41,6 +42,7 @@ $ slack docs # Open Slack developer docs
## See also

* [slack activity](slack_activity) - Display the app activity logs from the Slack Platform
* [slack api](slack_api) - Call any Slack API method
* [slack app](slack_app) - Install, uninstall, and list teams with the app installed
* [slack auth](slack_auth) - Add and remove local team authorizations
* [slack collaborator](slack_collaborator) - Manage app collaborators
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ slack activity [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
125 changes: 125 additions & 0 deletions docs/reference/commands/slack_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# `slack api`

Call any Slack API method

## Description

Call any Slack API method directly.

The method argument is the Slack API method name (e.g., "chat.postMessage").
Parameters are passed as key=value pairs, a JSON body, or via flags.

Body format is auto-detected from positional arguments:
- Multiple key=value args: form-encoded (token in request body)
- Single arg starting with { or [: JSON (Bearer token in header)
- No args: token sent in Authorization header

Use --json to explicitly send a JSON body, or --data for a form-encoded body string.

Token resolution (in priority order):
1. --token flag Explicit token value
2. --app flag Install app and use bot token (in project)
3. SLACK_BOT_TOKEN env var Bot token (set during slack deploy)
4. SLACK_USER_TOKEN env var User token
5. App prompt (in project) Select installed app and use bot token

See all methods at: https://docs.slack.dev/reference/methods

```
slack api <method> [key=value ...] [flags]
```

## Flags

```
--data string form-encoded request body string (e.g. "key1=val1&key2=val2")
-H, --header strings additional HTTP headers (format: "Key: Value")
-h, --help help for api
-i, --include include HTTP status code and response headers in output
--json string JSON request body (uses Bearer token in Authorization header)
-X, --method string HTTP method for the request (default "POST")
```

## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
-f, --force ignore warnings and continue executing command
--no-color remove styles and formatting from outputs
-s, --skip-update skip checking for latest version of CLI
-w, --team string select workspace or organization by team name or ID
--token string set the access token associated with a team
-v, --verbose print debug logging and additional info
```

## Examples

```
# Test your API connection
$ slack api api.test

# Check authentication
$ slack api auth.test

# Add a bookmark to a channel
$ slack api bookmarks.add channel_id=C0123456 title=Docs link=https://example.com

# Send a message to a channel using form-encoded string
$ slack api chat.postMessage channel=C0123456 text="Hello"

# Send a message to a channel using JSON
$ slack api chat.postMessage --json '{"channel":"C0123456","text":"Hello"}'

# Update a message
$ slack api chat.update channel=C0123456 ts=1234567890.123456 text="Updated"

# Create a channel
$ slack api conversations.create name=new-channel

# Fetch messages from a channel
$ slack api conversations.history channel=C0123456

# Get channel details
$ slack api conversations.info channel=C0123456

# List channels
$ slack api conversations.list

# List members in a channel
$ slack api conversations.members channel=C0123456

# Upload a file
$ slack api files.upload channels=C0123456 filename=report.csv

# Pin a message
$ slack api pins.add channel=C0123456 timestamp=1234567890.123456

# Add an emoji reaction
$ slack api reactions.add channel=C0123456 timestamp=1234567890.123456 name=thumbsup

# List reactions for a user
$ slack api reactions.list user=U0123456

# Get user details
$ slack api users.info user=U0123456

# List workspace members
$ slack api users.list

# Get a user's profile
$ slack api users.profile.get user=U0123456

# Open a modal view
$ slack api views.open trigger_id=T0123456 view={...}

# Update a modal view
$ slack api views.update view_id=V0123456 view={...}
```

## See also

* [slack](slack) - Slack command-line tool

1 change: 1 addition & 0 deletions docs/reference/commands/slack_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack app [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack app delete [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ slack app install [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_link.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ slack app link [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ slack app list [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ slack app settings [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack app uninstall [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_app_unlink.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ slack app unlink [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack auth <subcommand> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_auth_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack auth list [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_auth_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ slack auth login [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_auth_logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ slack auth logout [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_auth_revoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack auth revoke [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_auth_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ slack auth token [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_collaborator.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack collaborator <subcommand> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_collaborator_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ slack collaborator add [email|user_id] [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_collaborator_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack collaborator list [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_collaborator_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack collaborator remove [email|user_id] [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ slack create [name | agent <name>] [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ slack datastore <subcommand> <expression> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore_bulk-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ slack datastore bulk-delete <expression> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore_bulk-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ slack datastore bulk-get <expression> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore_bulk-put.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ slack datastore bulk-put <expression> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore_count.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ slack datastore count [expression] [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ slack datastore delete <expression> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands/slack_datastore_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ slack datastore get <expression> [flags]
## Global flags

```
--accessible use accessible prompts for screen readers
-a, --app string use a specific app ID or environment
--config-dir string use a custom path for system config directory
-e, --experiment strings use the experiment(s) in the command
Expand Down
Loading
Loading