All templates

Messaging

Mock the Slack Web API

Post messages and list channels without spamming a real workspace.

3 routes · live immediately · no account needed

Testing a Slack integration against a real workspace means either a channel full of test noise or a second workspace to maintain. These routes speak Slack's Web API dialect — the ok boolean, ts message timestamps, and the string error codes — including a conditional channel_not_found failure so you can test the branch your bot takes when a channel disappears.

What you get

POST/api/chat.postMessagetemplated200 OK
POST/api/chat.postMessageconditional200 OK
GET/api/conversations.list200 OK

Response template

POST /api/chat.postMessage

Values in double braces are rendered per request.

{
  "ok": true,
  "channel": "{{ request.body.channel }}",
  "ts": "1401383885.000061",
  "message": {
    "type": "message",
    "subtype": "bot_message",
    "text": "{{ request.body.text }}",
    "username": "mockbase",
    "bot_id": "B19LU7CSY",
    "ts": "1401383885.000061"
  }
}

Good for

  • Build a Slack bot without posting test messages to a real channel
  • Test the channel_not_found and not_authed error branches on demand
  • Run integration tests with no workspace and no bot token

Response payloads are representative examples using this API's real field names and object shapes, not an exhaustive replica of its schema. MockBase is an independent tool and is not affiliated with, endorsed by, or sponsored by Slack.