Maton

Slack

Access the Slack API with managed OAuth authentication. Send messages, manage channels, list users, and automate Slack workflows.

Reference

Auth Test

GET /slack/api/auth.test
maton slack whoami

Returns current user and team info.

Post Message

POST /slack/api/chat.postMessage
Content-Type: application/json

{
  "channel": "C0123456789",
  "text": "Hello, world!"
}
maton slack message send --channel C0123456789 --text 'Hello, world!'

With blocks:

POST /slack/api/chat.postMessage
Content-Type: application/json

{
  "channel": "C0123456789",
  "blocks": [
    {"type": "section", "text": {"type": "mrkdwn", "text": "*Bold* and _italic_"}}
  ]
}
maton slack message send --channel C0123456789 --blocks '[{"type":"section","text":{"type":"mrkdwn","text":"*Bold* and _italic_"}}]'

Post /me-style Message

maton slack message me --channel C0123456789 --text 'is deploying'

Post Thread Reply

POST /slack/api/chat.postMessage
Content-Type: application/json

{
  "channel": "C0123456789",
  "thread_ts": "1234567890.123456",
  "text": "This is a reply in a thread"
}
maton slack message reply --channel C0123456789 --thread-ts 1234567890.123456 --text 'This is a reply in a thread'

Update Message

POST /slack/api/chat.update
Content-Type: application/json

{
  "channel": "C0123456789",
  "ts": "1234567890.123456",
  "text": "Updated message"
}
maton slack message update --channel C0123456789 --ts 1234567890.123456 --text 'Updated message'

Delete Message

POST /slack/api/chat.delete
Content-Type: application/json

{
  "channel": "C0123456789",
  "ts": "1234567890.123456"
}
maton slack message delete --channel C0123456789 --ts 1234567890.123456

Schedule Message

POST /slack/api/chat.scheduleMessage
Content-Type: application/json

{
  "channel": "C0123456789",
  "text": "Scheduled message",
  "post_at": 1734567890
}
maton slack schedule create --channel C0123456789 --text 'Scheduled message' --post-at 1734567890

List Scheduled Messages

GET /slack/api/chat.scheduledMessages.list
maton slack schedule list

Delete Scheduled Message

POST /slack/api/chat.deleteScheduledMessage
Content-Type: application/json

{
  "channel": "C0123456789",
  "scheduled_message_id": "Q1234567890"
}
maton slack schedule delete --channel C0123456789 --id Q1234567890
GET /slack/api/chat.getPermalink?channel=C0123456789&message_ts=1234567890.123456
maton slack message permalink --channel C0123456789 --message-ts 1234567890.123456

List Channels

GET /slack/api/conversations.list?types=public_channel,private_channel&limit=100
maton slack channel list --types public_channel,private_channel --limit 100

Types: public_channel, private_channel, im, mpim

Get Channel Info

GET /slack/api/conversations.info?channel=C0123456789
maton slack channel view C0123456789

Get Channel History

GET /slack/api/conversations.history?channel=C0123456789&limit=100
maton slack message list --channel C0123456789 --limit 100

With time range:

GET /slack/api/conversations.history?channel=C0123456789&oldest=1234567890&latest=1234567899
maton slack message list --channel C0123456789 --oldest 1234567890 --latest 1234567899

Get Thread Replies

GET /slack/api/conversations.replies?channel=C0123456789&ts=1234567890.123456
maton slack message replies --channel C0123456789 --ts 1234567890.123456

Get Channel Members

GET /slack/api/conversations.members?channel=C0123456789&limit=100
maton slack channel members C0123456789 --limit 100

Create Channel

POST /slack/api/conversations.create
Content-Type: application/json

{
  "name": "new-channel-name",
  "is_private": false
}
maton slack channel create --name new-channel-name

Join Channel

POST /slack/api/conversations.join
Content-Type: application/json

{
  "channel": "C0123456789"
}
maton slack channel join C0123456789

Leave Channel

POST /slack/api/conversations.leave
Content-Type: application/json

{
  "channel": "C0123456789"
}
maton slack channel leave C0123456789

Archive Channel

POST /slack/api/conversations.archive
Content-Type: application/json

{
  "channel": "C0123456789"
}
maton slack channel archive C0123456789

Unarchive Channel

POST /slack/api/conversations.unarchive
Content-Type: application/json

{
  "channel": "C0123456789"
}
maton slack channel unarchive C0123456789

Rename Channel

POST /slack/api/conversations.rename
Content-Type: application/json

{
  "channel": "C0123456789",
  "name": "new-name"
}
maton slack channel rename C0123456789 --name new-name

Set Channel Topic

POST /slack/api/conversations.setTopic
Content-Type: application/json

{
  "channel": "C0123456789",
  "topic": "Channel topic here"
}
maton slack channel set-topic C0123456789 --topic 'Channel topic here'

Set Channel Purpose

POST /slack/api/conversations.setPurpose
Content-Type: application/json

{
  "channel": "C0123456789",
  "purpose": "Channel purpose here"
}
maton slack channel set-purpose C0123456789 --purpose 'Channel purpose here'

Invite to Channel

POST /slack/api/conversations.invite
Content-Type: application/json

{
  "channel": "C0123456789",
  "users": "U0123456789,U9876543210"
}
maton slack channel invite C0123456789 --users U0123456789,U9876543210

Kick from Channel

POST /slack/api/conversations.kick
Content-Type: application/json

{
  "channel": "C0123456789",
  "user": "U0123456789"
}
maton slack channel kick C0123456789 --user U0123456789

Mark Channel Read

POST /slack/api/conversations.mark
Content-Type: application/json

{
  "channel": "C0123456789",
  "ts": "1234567890.123456"
}
maton slack channel mark C0123456789 --ts 1234567890.123456

Open DM Conversation

POST /slack/api/conversations.open
Content-Type: application/json

{
  "users": "U0123456789"
}
maton slack conversation open --users U0123456789

For group DM:

POST /slack/api/conversations.open
Content-Type: application/json

{
  "users": "U0123456789,U9876543210"
}
maton slack conversation open --users U0123456789,U9876543210

List DM Channels

GET /slack/api/conversations.list?types=im
maton slack channel list --types im

List Group DM Channels

GET /slack/api/conversations.list?types=mpim
maton slack channel list --types mpim

My Conversations

GET /slack/api/users.conversations?limit=100
maton slack conversation list --limit 100

List Users

GET /slack/api/users.list?limit=100
maton slack user list --limit 100

Get User Info

GET /slack/api/users.info?user=U0123456789
maton slack user view U0123456789

Get User Presence

GET /slack/api/users.getPresence?user=U0123456789
maton slack user presence U0123456789

Lookup User by Email

GET /slack/api/users.lookupByEmail?email=user@example.com
maton slack user lookup --email user@example.com

Add Reaction

POST /slack/api/reactions.add
Content-Type: application/json

{
  "channel": "C0123456789",
  "name": "thumbsup",
  "timestamp": "1234567890.123456"
}
maton slack reaction add --channel C0123456789 --ts 1234567890.123456 --emoji thumbsup

Remove Reaction

POST /slack/api/reactions.remove
Content-Type: application/json

{
  "channel": "C0123456789",
  "name": "thumbsup",
  "timestamp": "1234567890.123456"
}
maton slack reaction remove --channel C0123456789 --ts 1234567890.123456 --emoji thumbsup

Get Reactions on Message

GET /slack/api/reactions.get?channel=C0123456789&timestamp=1234567890.123456
maton slack reaction get --channel C0123456789 --ts 1234567890.123456

List My Reactions

GET /slack/api/reactions.list?limit=100
maton slack reaction list --limit 100

List Stars

GET /slack/api/stars.list?limit=100
maton slack star list --limit 100

Add Star

POST /slack/api/stars.add
Content-Type: application/json

{
  "channel": "C0123456789",
  "timestamp": "1234567890.123456"
}
maton slack star add --channel C0123456789 --ts 1234567890.123456

Remove Star

POST /slack/api/stars.remove
Content-Type: application/json

{
  "channel": "C0123456789",
  "timestamp": "1234567890.123456"
}
maton slack star remove --channel C0123456789 --ts 1234567890.123456

List Pins

GET /slack/api/pins.list?channel=C0123456789
maton slack pin list C0123456789

Add Pin

POST /slack/api/pins.add
Content-Type: application/json

{
  "channel": "C0123456789",
  "timestamp": "1234567890.123456"
}
maton slack pin add --channel C0123456789 --ts 1234567890.123456

Remove Pin

POST /slack/api/pins.remove
Content-Type: application/json

{
  "channel": "C0123456789",
  "timestamp": "1234567890.123456"
}
maton slack pin remove --channel C0123456789 --ts 1234567890.123456

List Bookmarks

GET /slack/api/bookmarks.list?channel_id=C0123456789
maton slack bookmark list --channel C0123456789

Add Bookmark

POST /slack/api/bookmarks.add
Content-Type: application/json

{
  "channel_id": "C0123456789",
  "title": "Team Handbook",
  "type": "link",
  "link": "https://example.com/handbook"
}
maton slack bookmark add --channel C0123456789 --title 'Team Handbook' --type link --link https://example.com/handbook

Edit Bookmark

POST /slack/api/bookmarks.edit
Content-Type: application/json

{
  "bookmark_id": "Bk0123456789",
  "channel_id": "C0123456789",
  "title": "Updated Title",
  "link": "https://example.com/new"
}
maton slack bookmark edit --channel C0123456789 --bookmark-id Bk0123456789 --title 'Updated Title' --link https://example.com/new

Remove Bookmark

POST /slack/api/bookmarks.remove
Content-Type: application/json

{
  "bookmark_id": "Bk0123456789",
  "channel_id": "C0123456789"
}
maton slack bookmark remove --channel C0123456789 --bookmark-id Bk0123456789

Get Bot Info

GET /slack/api/bots.info?bot=B0123456789
maton slack bot view B0123456789

Note: this expects the B-prefixed bot ID (from bot_id on a message), not the bot's U-prefixed user ID. Passing a U… ID returns bot_not_found.

List Files

GET /slack/api/files.list?count=100

Filter by channel, user, or file types:

GET /slack/api/files.list?channel=C0123456789&user=U0123456789&types=images,pdfs
maton slack file list --count 100
maton slack file list --channel C0123456789 --user U0123456789 --types images,pdfs

Upload File

POST /slack/api/files.upload
Content-Type: multipart/form-data

channels=C0123456789
content=file content here
filename=example.txt
title=Example File

Upload File v2 (Get Upload URL)

GET /slack/api/files.getUploadURLExternal?filename=example.txt&length=1024

Complete File Upload

POST /slack/api/files.completeUploadExternal
Content-Type: application/json

{
  "files": [{"id": "F0123456789", "title": "My File"}],
  "channel_id": "C0123456789"
}
maton slack file upload --file ./example.txt --channel C0123456789 --title 'My File'

Delete File

POST /slack/api/files.delete
Content-Type: application/json

{
  "file": "F0123456789"
}
maton slack file delete F0123456789

Get File Info

GET /slack/api/files.info?file=F0123456789
maton slack file view F0123456789

Search Messages

GET /slack/api/search.messages?query=keyword
maton slack search messages 'keyword'

Search Files

GET /slack/api/search.files?query=keyword

Note: search.files matches against filename and title, not file body content. Newly uploaded files may take a moment to appear in results due to indexing lag.

Maton Events

direct_message.received

Parameters

  • channel_id (string, required): The DM conversation ID to scope to (e.g. D1234567890). Only messages in this DM conversation will fire the trigger.

channel_message.received

Parameters

  • channel_id (string, required): The channel ID to scope to (e.g. C07HD301C9L). Only messages posted in this channel will fire the trigger.

reaction.added

Parameters

  • reaction (string, required): The emoji name without colons to match (e.g. robot_face, white_check_mark).
  • channel_id (string, optional): Scope to a single channel, or leave blank to match all channels.

Resources

On this page