Docs Notification Channels

Notification Channels

Mockarty supports sending notifications through external messaging services — Telegram, Slack, Discord, Microsoft Teams, and others. This allows users to receive real-time alerts about test results, fuzzing findings, contract drift, and system events directly in their preferred messenger.

Start with the setup steps below. If you only want to receive notifications,
you need a channel that an administrator has already made available.

Who sets up notifications

  1. An administrator adds a channel in Admin Panel → Notification Channels
    and sends a test message. This is where the service credentials are set.
  2. A user opens Settings → My Notification Channels, connects to an
    available channel, and chooses which events to receive.
  3. For a shared team channel, a namespace administrator creates a subscription
    under Settings → Namespace Callbacks → Team channels. The subscription
    chooses the events and whether to send them immediately or as a digest.

Mockarty sends each selected event through the connected service. You can check
whether a message was delivered in the delivery log. The sections below show
which services are available and how to connect them.

Closing a subscription form does not cancel a request already sent. Its result is shown while you remain on the same page and namespace. Changing page or namespace closes the form; a late response cannot update the new view. If the result is uncertain, check the team subscription list before creating another subscription.

If the event or channel catalogue cannot be loaded within 15 seconds, the form shows an error and Retry. Retry is manual; opening or closing the form does not repeat a subscription creation request.

If deleting a team subscription times out or returns an unconfirmed result, another delete for that subscription is blocked in the current browser session. Check status and Retry only reload the list. The block is cleared when a complete list for the same namespace confirms that the subscription is absent; this confirms its current state, not why it disappeared. An incomplete or invalid list keeps the block and shows a loading error. Changing namespace does not erase the unresolved result.

To remove a team subscription, select it in the list and choose Delete in its detail panel. Confirm before Mockarty sends the request. The button is disabled while deletion is pending or its result is unknown; checking status reloads the list.

Permissions for shared channel bindings

Listing available corporate templates and bindings requires access to the selected namespace. Creating or deleting a corporate binding and sending its test message require channels:write there. Viewing the namespace alone does not grant these actions. If permission checking is unavailable, the server refuses the action.

In corporate channel bindings, an unknown create or delete result blocks the same operation while this page session remains open, including after closing the dialog or changing namespaces. Check status reloads the current list. Creation is reconciled only when a binding with the same template and complete target settings is present; deletion requires its absence from a complete list of the same namespace. Failed, partial, duplicate or invalid lists keep the block. A read timeout stops the GET; use Retry to load again. A full application reload ends this local safeguard, so check the list before resubmitting.

For the corporate template and binding API, select the namespace with ?namespace=.... Otherwise the authenticated namespace is used, followed by X-Mockarty-Namespace and the default sandbox. A namespace-pinned credential cannot switch to another namespace. A namespace field in the delivery configuration does not select a different namespace.

A corporate binding’s target lives in its bind_config. The server normalises the accepted keys to the ones the sender reads: Slack channel becomes channelId (a channel id such as C0123456789; a #name is refused), and Webex room_id becomes roomId. A Slack or Webex email in bind_config is used as that binding’s direct-message recipient. So a binding can name one of two things — a channel/room for a team-wide post (channel/channelId or room_id/roomId) or an e-mail for a personal DM — and it must name one of them: Slack requires channel or email, Webex requires email or room_id.

Choosing a delivery mode

Choose Immediate to send each team-channel event as it happens. Choose a
digest every 5 or 15 minutes, hourly, or daily to combine events into one
message with counts by event type. Set this when creating the subscription in
Settings → Namespace Callbacks → Team channels (digestMode in the API and
MCP tool). A digest may arrive up to one minute after its window ends.

The delivery log shows digesting while events are being collected. After
sending, it shows delivered or failed with a reason.

Digest messages use the same event titles as the in-app bell. Their language is
chosen in Settings → Notifications policy → Digest language; the default
follows the installation language (English unless the installation runs in
Russian). Advanced/headless option: MOCKARTY_DIGEST_LANGUAGE=ru|en seeds that
setting on the first start only — the saved value wins afterwards. The delivery
mode itself (immediate, 5/15 minutes, hourly, daily) is chosen in
Settings → Namespace Callbacks → Team channels. If MOCKARTY_PUBLIC_URL is set, the message links to the full
notifications in /ui/notifications.

If the service is temporarily unavailable, Mockarty retries delivery. Muting
the event, disconnecting the channel, or changing its recipient stops pending
delivery to the old recipient. The delivery log still shows the stopped
attempt.

The bell can notify you when another user’s Harness agent sends a request to your agent in a shared Room that you have joined. Open the notification to read the request in the Room.

When a functional test or fuzzing run reports its elapsed time, open its notification in the bell to see the duration. The duration is omitted if no measurement is available.

Supported Channels

Channel Type How it works
Telegram Bot API Admin creates a bot via @BotFather, users connect via deeplink
Slack Bot Token / Webhook Channel post via bot token (channelId), DM via bot token + email lookup, or channel webhook
Discord Webhook Channel-level webhook, no per-user binding needed
Microsoft Teams Workflow Webhook Adaptive Card via Power Automate Workflow webhook
Mattermost Webhook Slack-compatible incoming webhook
Rocket.Chat Webhook Slack-compatible incoming webhook
Пачка (Pachca) Webhook Chat-level incoming webhook
VK Teams Bot API Messages via the VK Teams Bot API (self-hosted API address supported)
PagerDuty Events API v2 Creates an incident for every event routed to the channel; Severity only sets the incident’s severity
OpsGenie Alert API Creates alerts with priority mapping
Google Chat Webhook Space-level webhook
Webex Bot API Space post via bot token (roomId), or DM via bot token + email
Matrix Client-Server API Bot posts m.room.message into a room; HTML body, threads and matrix.to mentions
Generic Webhook HTTP POST Custom URL with optional HMAC signature

Implementation and certification status. Discord and Microsoft Teams are
implemented in this build and covered by source tests: payload shape (embed /
Adaptive Card), native mentions, HTTP error classification and retry-after
handling. Discord and Teams behaviour is pinned field-by-field to each
provider’s published documentation (2026-10-27 evidence:
docs/research/evidence/2026-10-27-adapter-doc-parity/). They are not
live-certified
in the current release evidence — no owned Discord guild
webhook or Microsoft Teams tenant webhook was used, so delivery to a real
workspace is not claimed. Matrix is implemented and source-tested in this
build: idempotent PUT /send/m.room.message/{txnId}, HTML formatted_body,
m.mentions, thread relations, matrix.to pill anchors, typed errcode
refusals and Retry-After/retry_after_ms handling, driven against a
loopback fake homeserver. It is not live-certified: this evidence used no
owned Matrix homeserver, room id or bot access token. Its inbound surface is
deliberately absent — Matrix is outbound-only here. The remaining built-in
outbound transports in this table — VK Teams, Пачка (Pachca), Rocket.Chat,
Google Chat, PagerDuty, OpsGenie, the generic webhook and Telegram — are
also pinned field-by-field for endpoint, auth carrier, mentions, length
limits and refusal/retry semantics to each provider’s published documentation
and this repository’s generic-webhook contract (2026-10-27 evidence:
docs/research/evidence/2026-10-27-adapter-doc-parity-rest/). They are not
live-certified
: the evidence used loopback fakes only, so delivery to a real
workspace, alerting account or bot is not claimed.

Admin Setup

Adding a Channel

  1. Go to Admin Panel → Notification Channels
  2. Click Add Channel
  3. Select the channel type
  4. Fill in the configuration (follow the setup hints shown for each type)
  5. (Optional) Set Namespace — leave empty to make the channel global (visible in every namespace) or enter a specific namespace name to scope it. The field is safe to change later via update.
  6. Click Save
  7. Use Test button to verify connectivity

Updating a Channel (secrets-safe)

When editing an existing channel, the form shows password fields MASKED (xoxb****). You do not need to re-enter a secret:

  • leaving the masked value as it is (or clearing it) keeps the stored secret — the server recognises its own mask and never stores xoxb****;
  • typing a new value replaces the secret;
  • every non-secret field is stored exactly as submitted, so clearing an optional field (for example a fallback webhook URL) really removes it. Fill it again if you want to keep it.

Namespace is not part of the admin form; a channel created in the UI is global. Move it to a namespace with the API (PUT /api/v1/admin/channels/{id} with {"namespace":"team-a"}, empty string = global).

Admin audit log

Every admin-initiated channel change is recorded in the audit log (visible in Admin Panel → Audit Log). Three action codes identify the events:

Action When it fires Captured fields
create_notification_channel New channel persisted type, name, enabled, actor, IP, namespace
update_notification_channel Channel PUT succeeded type, name, enabled, actor, IP, namespace
delete_notification_channel Channel DELETE succeeded type, name (snapshot taken before delete), actor, IP, namespace

Secret fields (bot tokens, webhook URLs, passwords) are never written to the audit log — only the public metadata is captured. Use this log to trace who configured a channel, when it was disabled, or which admin removed a target that stopped receiving alerts.

Channel Configuration Examples

Telegram

  1. Open Telegram, find @BotFather
  2. Send /newbot, follow the prompts to create a bot
  3. Copy the bot token (format: 123456789:ABCdef...)
  4. In Mockarty Admin → Channels → Add → Telegram:
    • Bot Token: paste the token
    • Bot Username: @YourBotName (optional, for display)
    • Group / channel Chat ID: optional broadcast target (-100… for a group or channel). Mockarty creates a verified binding for it right away, so events post there without any deeplink; invite the bot to that chat first. A user’s personal binding still takes priority for that user.
  5. Save and enable

Users connect by clicking a deeplink that opens the bot in Telegram. Inbound update delivery defaults to long polling; switching the channel’s Inbound transport to webhook needs a public HTTPS entry point — either MOCKARTY_PUBLIC_URL on the node itself, or a Cloud pairing whose edge relays the update (see Inbound without a public host). Without either, Mockarty does not register the webhook, the channel stops polling, and the bot stops receiving updates (the API response carries a warning).

Messages follow the Bot API’s sendMessage contract: the text is kept within the documented 4096 characters (Telegram measures UTF-16 units) by trimming the body, then the trailing fields, then the title — a long stack trace is shortened instead of being rejected with message is too long. Preview generation is disabled through the current link_preview_options.is_disabled field (the old disable_web_page_preview flag is no longer part of the method). HTML-formatted messages escape user markup. A user id without a public username is tagged through the documented inline mention [Name](tg://user?id=…); a user with neither a username nor an id stays plain text. Telegram’s 429 is retried with the parameters.retry_after hint.

Slack

Option A: Bot Token (recommended)

  1. Go to api.slack.com/apps → Create New App
  2. Add Bot Token Scopes: chat:write. For DMs also add users:read.email and im:write — a DM is opened with conversations.open, which refuses without im:write (missing_scope). A channel post needs neither.
  3. Install to workspace, copy the Bot Token (xoxb-...)
  4. In Mockarty: paste as Bot Token
  5. For channel posts, invite the bot to the channel (/invite @your-bot) and paste the channel ID (Channel details → About → Channel ID, e.g. C0123456789) as Group / channel Chat ID. A name such as #alerts is rejected: the ID is the form that works everywhere the bot is a member.

With a channel ID every event posts straight into that channel — no per-user binding needed. Users can still enter their Slack email for DMs; a personal binding takes priority over the channel target for that user.

Option B: Incoming Webhook (channel-level)

  1. In Slack App → Incoming Webhooks → switch Activate Incoming Webhooks on → Add New Webhook
  2. Select a channel, copy the URL
  3. In Mockarty: paste as Webhook URL

Discord

  1. In Discord: Server Settings → Integrations → Webhooks → New Webhook
  2. Select a channel, copy the webhook URL
  3. In Mockarty: paste as Webhook URL

No per-user binding needed — messages go to the channel.

Mockarty sends an embed (or a plain content message for minimal events) and
enforces Discord’s published limits locally, so a noisy event body never costs
a rejected delivery: content is capped at 2000 characters, and the whole
embed at 6000 characters across title, description, fields and footer (an
oversized body is trimmed). @-mentions need Discord’s numeric id — a user
mention is sent as <@id>, a role as <@&roleId>, and @everyone/@here as
the room-wide form. The payload declares allowed_mentions and widens it only
to the categories the message actually uses, so a literal @everyone inside an
event body never pings the whole server. A role mention additionally requires
that role to be mentionable in Discord. On HTTP 429 the retry follows Discord’s
documented Retry-After / retry_after value.

Microsoft Teams

  1. In Teams channel: click ... → Workflows
  2. Select the webhook template “Send webhook alerts to a channel” (trigger: “When a Teams webhook request is received”)
  3. Follow the setup wizard, copy the webhook URL
  4. In Mockarty: paste as Webhook URL

Note: Legacy Office 365 Connector URLs are being retired. Use Workflows (Power Automate) webhooks.

Mockarty posts the documented Adaptive Card envelope
({"type":"message","attachments":[{"contentType":"application/vnd.microsoft.card.adaptive",…}]}),
which both Workflows and the outgoing Office 365 connectors accept. The request
is kept under Teams’ published 28 KB message limit: if an event carries a long
stack trace, the OpenUrl buttons are dropped first, then the fact list, then the
tail of the text. @-mentions are supported for users only (incoming webhooks
do not support bot, channel or team mentions): the card carries <at>Name</at>
in its body plus the matching msteams.entities entry, and the id must be the
person’s UPN, Microsoft Entra Object ID or Teams user id. A mention without such
an id stays plain text instead of pretending to notify.

PagerDuty

  1. In PagerDuty: Services → select service → Integrations tab
  2. Add Integration → Events API v2
  3. Copy the Integration Key
  4. In Mockarty: paste as Integration Key (routing_key)
  5. Optional: set Severity — one of critical, error, warning, info (defaults are applied per event type if omitted)

The Integration Key must be PagerDuty’s 32-character Events API key; any other length is refused at save time with the field named. The event summary is kept to the documented 1024 characters, and the whole event to the documented 512 KB (the largest custom_details values are dropped first, so a long log line no longer turns the alert into a 400). A 202 Accepted response means PagerDuty accepted the event; 429 is retried with its Retry-After hint; 400 is final and shown as a failed delivery.

OpsGenie

  1. In OpsGenie: Teams → select team → Integrations → Add integration → API
  2. Copy the API Key
  3. In Mockarty: paste as API Key
  4. Select Region — us (api.opsgenie.com) or eu (api.eu.opsgenie.com). Using the wrong region makes every delivery fail with a 4xx from the other region’s endpoint (visible in the delivery log).

Alert fields follow the published OpsGenie limits: message 130 characters, description 15 000, source 100, and the details map 8 000 characters in total (the longest values are dropped first). A 202 Accepted response means the alert was accepted for processing; 429 is retried with Retry-After; a 400 is final.

VK Teams

  1. Create a bot for your VK Teams tenant and copy its token (VK Teams Bot API documentation: https://myteam.mail.ru/botapi/).
  2. Add the bot to the chat that should receive notifications.
  3. In Mockarty: paste the token as Bot Token and the chat id as Chat ID. For a self-hosted installation set API Base URL to your server origin (default https://myteam.mail.ru).

VK Teams delivers through sendText; the channel-level Chat ID is the destination, so no per-user binding is required. The request is a documented POST carrying token, chatId and text in a multipart/form-data body, so the bot token never appears in a URL. The API publishes no per-message text limit — only the request caps (60 KB query string, 50 MB body) — so Mockarty bounds the body rather than inventing a text limit; a message that renders empty is replaced by a readable fallback because text is required. A user mention uses the documented @[userId] form: without a user id the name stays plain text and notifies nobody. A 200 response with "ok": false is a refusal (not retried); 429 is retried with Retry-After.

Webex

  1. Go to developer.webex.com → My Webex Apps → Create a New App → Bot, and copy the Bot Access Token.
  2. Add the bot to the Webex space that should receive notifications.
  3. In Mockarty: paste the token as Bot Token.
  4. For a space, paste its room id (Webex GET /v1/rooms, or the space’s API id) as Chat ID. For personal delivery, add a Webex Email binding instead.

A room id is a complete destination on its own; an e-mail binding takes priority for that person when both are present.

Matrix

  1. On your homeserver, create a dedicated bot user (for example with the
    registration API or your admin console) and log it in. A normal user
    account works; a dedicated bot account is recommended so its token can be
    revoked without affecting a person.

  2. Invite the bot to the room that should receive notifications
    (/invite @mockarty-bot:example.com) and accept the invite from the bot
    account.

  3. Give the bot the power level it needs to send messages. The default
    power level for events_default is usually enough; if the room restricts
    messages (events_default above the bot’s level, or m.room.message
    explicitly raised), set the bot’s power level to at least that value.

  4. Obtain an access token for the bot user. With curl:

    curl -s -X POST https://matrix.example.com/_matrix/client/v3/login \
      -H 'Content-Type: application/json' \
      -d '{"type":"m.login.password","user":"@mockarty-bot:example.com","password":"…"}'
    

    Copy the access_token from the response. Do not use a short-lived token
    that expires before the notifications do.

  5. In Mockarty → Admin → Channels → Add → Matrix:

    • Homeserver URL: the Client-Server API origin, e.g. https://matrix.example.com
      (plain http is accepted only for localhost, a loopback address or a
      private-network host — a homelab/air-gapped homeserver).
    • Room ID: the opaque room id starting with ! and containing : —
      !abcdef:example.com. A room alias (#room:example.com) is refused at
      save time; resolve it to its id first. Room details → Advanced shows it.
    • Access Token: the token from step 4.
    • Thread Root Event ID (optional): an event id starting with $; every
      notification then posts into that thread. Events may also carry their own
      threadId in the payload, which wins for that delivery.
    • Idempotency Strategy: derived (default) hashes the message identity
      into the transaction id, so a retry replays the first event instead of
      double-posting. random deliberately posts every attempt as a new event.
  6. Save and use Test; no recipient is needed because the room is part of
    the channel configuration.

The access token is a channel secret: the admin API and the UI return it masked
(syt_****), and leaving the field empty while editing keeps the stored token.
Only the first four characters remain visible, enough to tell two tokens apart.

Rich messages are sent as m.text with format: org.matrix.custom.html and a
formatted_body; a plain body is always included for clients that ignore
HTML. A mention is an anchor in the HTML body
(<a href="https://matrix.to/#/@user:server">Name</a>) and the display name in
the plain body — the Matrix URI lives only in the HTML. The notification itself
is carried by the m.mentions property (user_ids for people, room: true for
@room), as the Client-Server API requires since v1.7; from v1.17 the old push
rules that looked for names and @room in body were removed. An event is kept
under the documented 64 KiB ceiling: the HTML body is dropped first, then the
plain text is trimmed, so the message still arrives. A 4xx from the homeserver is
reported with its stable errcode (for example M_FORBIDDEN — missing power
level, or M_UNKNOWN_TOKEN — revoked token); 429/5xx are retried with the
homeserver’s Retry-After or retry_after_ms honoured.

Pachca (Пачка)

  1. In Pachca, create an incoming webhook for the chat (chat settings → integrations → incoming webhook).
  2. Copy the webhook URL.
  3. In Mockarty: paste it as Webhook URL.

Messages are posted as {"message": "<markdown>"}; the chat is fixed by the webhook, so no per-user binding is required. The message is kept within Pachca’s published limit — 40 000 bytes, and 27 000 in a space with advanced encryption — so Mockarty trims to 27 000 (a notification then fits either space); an empty message is never sent. A mention is @nickname or <@user_id>: a person known only by id is tagged with <@user_id>, and a label with neither notifies nobody.

Google Chat

  1. In the Google Chat space: Apps & integrations → Webhooks → Add webhook.
  2. Copy the webhook URL.
  3. In Mockarty: paste it as Webhook URL.

The message is kept within Google’s documented 32 000-byte limit (text and cards together), and a card carries at most the documented 100 widgets — above that Google ignores whole sections, so the adapter drops trailing widgets instead. A user mention is <users/…>; a room-wide mention becomes <users/all>. 429 is retried with Retry-After; a 400 is final.

Generic Webhook

  1. In Mockarty: paste your endpoint as URL (absolute http(s)).
  2. Optional: add static Headers and an HMAC Secret. With a secret, every request carries X-Mockarty-Signature: sha256=<hex HMAC-SHA256 of the raw body> so the receiver can verify authenticity.

Rich events carry the typed v1 envelope (schema_version: "v1", event_type, occurred_at, severity, summary, title, text, link, source, fields, actions); minimal title/text messages keep the older envelope (title, text, severity, link, source, sentAt). X-Mockarty-Schema and X-Mockarty-Event mirror the body for routing without parsing. A generic receiver has no mention concept: an @name token is delivered verbatim, never rewritten. There is no provider-side message limit — the receiver owns that policy; 429 is retried with Retry-After and a 4xx other than 408/429 is final.

Testing a Channel

After saving, click the Test button on any channel to send a test notification. For channels that require a recipient (Telegram, or a Slack/Webex bot token without a configured channel/room id), you’ll need to provide a chat id or e-mail. A Slack channel with a channel ID, a Webex channel with a room id, and any webhook channel are complete targets on their own. The Test result reports what the messenger answered: a rejected post (for example Slack’s not_in_channel, or a Telegram chat not found) is shown as a failure, not as delivered.

Outbound API origins (isolated networks)

Telegram, Slack and Webex delivery defaults to the public APIs. In an isolated network, or when testing against a local stand, point outbound calls at a mirror or relay in Admin → Notification Channels → Delivery settings → Advanced: messenger API origins.

The variables below are an advanced/headless first-run seed: they are read once on a fresh installation and stored. Afterwards the value saved in the UI wins.

Variable (seed) Default Purpose
MOCKARTY_TELEGRAM_API_BASE_URL https://api.telegram.org Origin for outbound Bot API calls (sendMessage, getUpdates, setMyCommands, file downloads). A path is allowed; endpoints are appended to it.
MOCKARTY_SLACK_API_BASE_URL https://slack.com/api Origin for outbound Slack Web API calls (chat.postMessage, conversations.open, users.lookupByEmail). Include the /api suffix. Slack Incoming Webhooks are supplied per channel and are not affected.
MOCKARTY_WEBEX_API_BASE_URL https://webexapis.com Origin for outbound Webex REST calls (/v1/messages). Do not include /v1; endpoints are appended to it.

All three values must be absolute URLs without embedded credentials, a query string or a fragment. https is accepted for any host. Plain http is accepted only for a loopback host (localhost, 127.0.0.1, ::1) and only when MOCKARTY_DEV_MODE=true or ALLOW_PROXY_TO_PRIVATE_IPS=true — production traffic is never silently downgraded to plaintext. An invalid value produces a configuration error that names the variable (and never echoes the value), and delivery stops instead of falling back to the public API.

These are advanced/headless settings for isolated networks: there is no Settings control for them yet, so set them on the admin node before startup. Normal use requires nothing — the defaults above are the public APIs.

User Setup

Connecting to Channels

  1. Go to Settings → My Notification Channels
  2. Available channels configured by admin are listed under Available Channels
  3. Click Connect on the desired channel

Telegram Connection

  1. Click Connect on the Telegram channel
  2. A deeplink opens – click it to go to the bot in Telegram
  3. Press Start in the bot chat
  4. Connection is confirmed automatically

Slack Connection

  1. Click Connect on the Slack channel
  2. Enter your Slack workspace email
  3. Mockarty resolves your Slack user ID and sends DMs directly

Receiving Slack events and slash commands

Outbound posting needs only chat:write. To let people talk to the bot:

  1. In the Slack app open Basic Information → App Credentials, copy the Signing Secret and paste it into the Mockarty channel as Signing Secret. Every inbound call is verified against X-Slack-Signature with a 5-minute replay window; without the secret Mockarty answers 401 to every event.
  2. Add Bot Token Scopes: app_mentions:read (mentions), channels:history (needed by /summarize and /topics), im:history (commands typed in a DM), users:read (group moderation), and commands if you want slash commands.
  3. Under Event Subscriptions set the Request URL to https://<your-public-host>/api/v1/messenger/webhook/slack/<mockarty-channel-id> and subscribe to app_mention (add message.channels if you link a channel to a Mockarty discussion).
  4. For slash commands, register EACH command you want (/ask, /do, /meet, /tasks, /status, /help, /link, /topics, /summarize, /guard) separately with the same Request URL https://<your-public-host>/api/v1/messenger/slack/command/<mockarty-channel-id>; Mockarty routes by the command name.
  5. <mockarty-channel-id> is the id of the Slack row in Admin Panel → Notification Channels — not the Slack conversation id. The public host must be reachable from Slack over HTTPS.

Inbound without a public host (Cloud edge relay)

A Desktop install, or a Mockarty server behind NAT, has no public HTTPS domain. When the install is paired with a Cloud Space, the Cloud edge accepts the provider call and relays it to the node over the authenticated node channel. The platform is a path parameter, and a platform may expose more than one inbound endpoint:

Transport Inbound Edge Request URL
Slack Events API yes https://<cloud-host>/api/v1/cloud/ingress/messenger/slack/<channel-id>
Slack slash commands yes https://<cloud-host>/api/v1/cloud/ingress/messenger/slack/<channel-id>/command
Telegram webhook yes (webhook mode) https://<cloud-host>/api/v1/cloud/ingress/messenger/telegram/<channel-id>
Mattermost slash command yes https://<cloud-host>/api/v1/cloud/ingress/messenger/mattermost/<channel-id>
Mattermost outgoing webhook yes https://<cloud-host>/api/v1/cloud/ingress/messenger/mattermost/<channel-id>/outgoing
Rocket.Chat outgoing webhook yes https://<cloud-host>/api/v1/cloud/ingress/messenger/rocketchat/<channel-id>
VK Teams no — pull only —
Discord / Microsoft Teams / Google Chat / Пачка / Matrix no — outbound only —

<channel-id> is the Mockarty notification channel id (the row in Admin Panel → Notification Channels), never the provider’s conversation id.

What verifies each request:

  • Slack — X-Slack-Signature v0 HMAC over v0:<timestamp>:<body>, with a 5-minute replay window. The same check covers the Events API and slash commands.
  • Telegram — X-Telegram-Bot-Api-Secret-Token against the channel’s webhookSecret.
  • Mattermost — the per-command slash token in the form body (constant-time). The same token authenticates the outgoing webhook.
  • Rocket.Chat — the outgoing-webhook token in the JSON body (form fallback), constant-time.

How the relay protects the request:

  • The edge verifies the provider proof itself; a mismatch is answered 401 and nothing is forwarded.
  • The raw body is forwarded byte-for-byte over the existing authenticated Cloud↔node channel, and the node verifies the same proof a second time before the normal handler runs. A mismatch at the node is also 401.
  • Because the bytes are untouched, the provider’s own response semantics — the Slack url_verification challenge and 3-second ACK, Mattermost/Rocket.Chat JSON replies, Telegram’s empty 200 — are preserved.
  • If the node is offline or too slow, the edge answers 503 with Retry-After; providers retry. The edge never answers 200 for an update it could not deliver.

Do not type any of these URLs. The channel settings page shows them, and GET /api/v1/admin/channels/{id}/ingress returns the exact targets (kind, label, url) together with the topology it resolved. The node itself decides the topology: when MOCKARTY_PUBLIC_URL is set the answer is direct_public_domain with this node’s own paths (/api/v1/messenger/…); when the node is paired with a Cloud Space and has no public domain it is cloud_edge with the /api/v1/cloud/ingress/messenger/… paths in the table above. Only platforms with a real inbound transport get a URL — the others get 409 and a reason. Telegram webhook mode registers the derived URL with Telegram automatically.

If the install has neither its own public HTTPS domain (MOCKARTY_PUBLIC_URL) nor a Cloud pairing, the endpoint returns 409 messenger_ingress_requires_public_edge and names the only two supported topologies: the Cloud edge, or an on-prem server with its own public domain. Mockarty does not provide a built-in tunnel — a Desktop-only install should keep Telegram in pull mode.

For a transport with no inbound hook at all, the endpoint returns 409 messenger_ingress_no_inbound_transport with the reason (VK Teams is long-poll only; Discord, Teams, Google Chat, Пачка and Matrix are called by Mockarty and never call back). The channel settings page shows that reason instead of a dead URL.

Webhook Channels (Discord, Teams, etc.)

These are channel-level — click Connect and you’re done. All users connected to the same channel receive the same messages.

A Rocket.Chat incoming webhook follows Rocket.Chat’s Post Message schema (text, alias, Slack-compatible attachments). The message is trimmed to Rocket.Chat’s shipped Message_MaxAllowedSize default of 5000 characters (counted in UTF-16 units; a workspace can raise the setting). A user mention is @username; a room-wide ping is @all (@here stays @here), and @channel is never sent because Rocket.Chat does not resolve it.

Notification Preferences Matrix

After connecting, configure which events trigger notifications. The preferences matrix lists every channel-deliverable event (dozens of them), grouped by category — test runs, performance, fuzzing, contracts, chat mentions and direct messages, meetings, task tracker, reviews, license and system alerts. Each channel column has an “All” toggle to switch the whole channel on or off in one click, and every event can be enabled or disabled per channel individually.

Preferences belong to each connected account (bindingId). Two connections can choose different settings for the same event, including connections of the same channel type. Repeating an update changes that connection only. General in-app and email preferences are configured separately from this matrix.

A few examples of canonical event IDs:

Event ID Description
test.run.completed API test collection run finished
perf.test.failed Performance / load test could not run to completion
perf.test.threshold_breach Performance / load test finished, but one or more thresholds were not met
fuzzing.finding.new Fuzzer detected a new vulnerability or anomaly
contract.drift_detected Contract drift detected between recorded and live response
alert.triggered An audit alert rule fired with notification_type: channel (see Security & compliance). The event carries the alert’s severity, the namespace, the entity it is about and, when the entity has a page, a button that opens it. A channel your namespace has bound receives these alerts; the rule’s eventType in notification_config names the event for the transports and is not a filter on this path
mission.done An autonomous mission started by a person finished successfully. The message names the goal and opens the mission card; subscribed by default
mission.failed An autonomous mission started by a person failed before completion. The message names the goal and opens the mission card; subscribed by default. A mission the person cancelled does not notify
system.alert System-level incident: a configured task-source bus (NATS/Kafka) has been unreachable for about a minute, or is reachable again. The node stays in service; the alert goes to the operator who saved the task source

The full, always-current list comes from GET /api/v1/channels/preferences (the eventTypes field) — the UI renders the matrix from it, so new event types appear automatically.

Escalating unread notifications

If a bell notification stays unread for too long, Mockarty can escalate it to one of your connected messengers as a digest. Enable it in Settings → My Notification Channels → Escalation: pick the target channel and the threshold (how long a notification may stay unread before escalation). The feature is opt-in and off by default; enabling it requires at least one connected channel binding.

API: GET /api/v1/notifications/escalation / PUT /api/v1/notifications/escalation.

Notification policy: quiet hours, digests and routing

Settings → Notifications policy sets rules for the whole namespace; a test plan’s Notifications button sets rules for that plan only, and each person can keep their own. When rules conflict the most specific wins (plan, then person, then namespace, then admin); extra channels add up across the levels.

  • Muted events and Mute until — the event reaches nobody at this level: no bell, no e-mail, no messenger.
  • Quiet hours (UTC) — inside the window your e-mail and messenger notifications are held and arrive as one digest when the window ends. The in-app bell still shows every event at once. With Critical events still fire a critical event comes through immediately.
  • Digest — outside quiet hours, e-mail and messenger notifications of the chosen severities are collected and sent as one message every cadence minutes. Critical events are never held. With Minimum events to send the digest waits for that many events — but not longer than a day.
  • Severity routing and Always-on sinks — the event is also sent to the chosen channels (for example every critical event to an on-call Slack channel), whatever the recipient’s own quiet hours. A channel receives each event once, however many people it concerned.
  • Per-event overrides (set through the API or by an agent with the notification_policy tool) — change an event’s severity, give it its own channels (replace keeps only those), or suppress repeats: with suppress for 10m the same event about the same plan or run reaches a person at most once in 10 minutes.

The digest arrives as the event Notification digest — you can mute or route it like any other event.

The page also shows the composed policy for the whole hierarchy. That projection is a technical JSON document and sits behind a collapsed Technical details control; the rules above are its readable form.

Messenger Bots — two-way commands

Telegram, Slack, VK Teams, Mattermost and Rocket.Chat channels are not just outgoing pipes: when the channel is configured for interaction, the bot also accepts commands — the same set on every messenger.

Connecting your account

A bot only acts on behalf of users it knows:

  • Telegram — connect from Settings → My Notification Channels (deeplink → press Start).
  • VK Teams, Mattermost, Rocket.Chat — click Connect on the channel in Settings → My Notification Channels. Mockarty shows the exact command with a one-time token (valid for a few minutes) and a Copy command button; send it as described below, and the bot answers when your account is linked.
  • VK Teams — send the bot /start <token>.
  • Slack — request a one-time code via POST /api/v1/channels/slack/connect, then send connect <code> to the bot in a direct message (see below).
  • Mattermost — run /mockarty link <token> in Mattermost.
  • Rocket.Chat — send the bot mockarty link <token> (the trigger word, then the command) — in the room the outgoing webhook is attached to, or in a direct message with the bot.

Slack’s account link is API-only: there is no separate button for it in Settings. Authenticated as a Mockarty user, post the channel id of the Slack channel whose bot you will message:

POST /api/v1/channels/slack/connect
{"channelId": "C0123456789"}
# → {"token":"…","expiresAt":"…","command":"connect …","instruction":"…"}

Send the returned command (connect <code>) to the Mockarty bot in a Slack direct message; it works once, for a few minutes. Two other Slack actions in the UI are different things and do not produce this code: the Connect button on the Slack card in Settings → My Notification Channels connects your Slack e-mail so notifications reach you, while the admin Connect Slack (one-click) button creates a whole channel plus its incoming webhook.

An unknown user who writes to a bot gets onboarding instructions instead of a refusal.

Setting up the Mattermost bot

Mattermost drives the bot over a slash command (no bot needs to stay connected):

  1. In the Mockarty admin, add a Mattermost channel and fill Server URL. The form also requires a Webhook URL or a Slash Command Token; because the token only exists after Mattermost knows the Mockarty channel id, save first with a temporary incoming-webhook URL (Mattermost → Integrations → Incoming Webhooks) and replace it in the next step.
  2. In Mattermost, Integrations → Slash Commands → Add a command with trigger word mockarty, Request URL https://<your-mockarty>/api/v1/messenger/webhook/mattermost/<channel-id>, method POST. Mattermost shows the command Token — paste it into the Mockarty channel’s Slash Command Token and save.
  3. Users type /mockarty <command> (e.g. /mockarty ask how do I mock gRPC). Command output is private to the sender; a meeting link is posted to the channel.

The Webhook URL field stays optional — set it if you also want outgoing notifications; the interactive bot works from Server URL + Slash Command Token alone.

Setting up the Rocket.Chat bot

Rocket.Chat drives the bot over an outgoing webhook (Rocket.Chat has no Mattermost-style slash-command integration):

  1. In the Mockarty admin, add a Rocket.Chat channel and fill Server URL. The form also requires a Webhook URL or an Outgoing Webhook Token; the token only exists after Rocket.Chat knows the Mockarty channel id, so save first with a temporary incoming-webhook URL (Rocket.Chat → Integrations → Incoming) and replace it in the next step.
  2. In Rocket.Chat, Admin → Integrations → New → Outgoing with event Message Sent, trigger word mockarty, and URL https://<your-mockarty>/api/v1/messenger/rocketchat/outgoing/<channel-id>. Rocket.Chat shows a Token — paste it into the Mockarty channel’s Outgoing Webhook Token and save.
  3. Users type mockarty <command> (e.g. mockarty ask how do I mock gRPC). Because outgoing-webhook replies are public, command output posts into the room.
  4. Optionally add Bot Auth Token + Bot User ID (a Rocket.Chat personal-access-token for a bot user) to enable the membership guard and call-lifecycle relay via the REST API.

The Webhook URL field stays optional — set it if you also want outgoing notifications; the interactive bot works from Server URL + Outgoing Webhook Token alone.

Commands

Command What it does
/menu Quick actions as inline buttons (new meeting, tasks, status, help)
/meet Create a video-meeting link (Discussions meeting)
/tasks Your open tasks from the task tracker
/do <request> Hand a task to the Mockarty AI agent
/ask <question> Ask the knowledge base
/notifications Your recent notifications
/status Bot status
/help All commands

In group chats, address the bot as /command@BotName (Telegram) or by mentioning it (Slack @bot, VK Teams). Slack additionally supports slash commands via a configurable endpoint and always verifies request signatures with the channel’s Signing Secret. On Mattermost every command is a subcommand of the slash trigger — /mockarty ask …, /mockarty meet, /mockarty tasks, /mockarty link <token> — and each request is verified against the command’s token.

The bot answers where you asked: a Slack reply goes into the same thread as your mention, a Telegram answer inside a forum topic stays in that topic (it does not fall back to General), and a VK Teams answer continues the reply chain when your message was itself a reply.

Voice messages (Telegram, VK Teams)

Send the bot a voice note (or an audio file / round video note) and it transcribes it with the Mockarty speech stack, then acts on the words:

  • In a private chat the transcript is treated as a task for the Mockarty AI agent — a hands-free /do. The bot replies with what it heard, hands the task to the agent under your account, and posts the agent’s answer back into the chat when it finishes. When speech synthesis is available on the deployment, the answer is also sent as a voice message (Telegram and VK Teams) — ask by voice, hear the reply. Requires your Telegram to be connected to a Mockarty account.
  • In a group chat the bot posts the transcript for everyone. If the group is linked to a discussion (/link), the transcript also joins the buffered history, so /summarize and /topics cover what was said out loud.

Voice notes up to 10 minutes are accepted. Transcription must be available on the deployment (a speech runner online or an external transcription API configured) — otherwise the bot says so honestly.

Linking a group chat to a discussion

A Telegram, VK Teams or Slack group can be linked to a Mockarty discussion: mint a token from the discussion panel (Sync → ), then send /link <token> in the group. From then on the bot keeps the recent history, /summarize posts a digest into the linked discussion, and /topics segments the buffered history into knowledge-base topics.

Creating the token requires permission to write in Discussions and to open
the linked entity in the selected space.

On Slack, linking additionally requires the app to subscribe to the message.channels event and be invited to the channel — that is how the bot sees the chatter it buffers for /summarize and /topics.

On Mattermost, the chat↔discussion link is /mockarty synclink <token> (distinct from /mockarty link, which binds your account), and buffering needs an outgoing webhook on the channel pointed at /api/v1/messenger/mattermost/outgoing/<Mockarty-channel-id> (use the same token as the slash command). Then /mockarty summarize and /mockarty topics work over the buffered history.

Group moderation

In groups the Telegram and VK Teams bots can guard membership with the full set /guard off | warn | grace | kick. Slack supports /guard off | warn | kick (a bound user sets it; the bot warns — or removes with the channels:manage scope + the member_joined_channel event — an unauthorized joiner); grace is available on Telegram and VK Teams. Mattermost supports /mockarty guard off | warn | kick too, but — because Mattermost gives the bot no join events — it enforces by a periodic membership poll and therefore needs an opt-in bot token (a bot account with manage_channel_members) set in the channel’s Bot Token field; without it guard stays off. Only a chat administrator can change the policy — except on Slack, where any member whose account is connected to Mockarty can, because Slack has no per-channel admin concept the bot can check. In grace mode a newcomer who is not connected to Mockarty gets a welcome message and a time window to connect before being removed; warn only warns, kick removes immediately, off disables guarding. Chat admins are always exempt — the guard never warns or removes an administrator (or the bot itself), so enabling kick will not touch the people who run the chat.

Telegram delivery mode: pull or webhook

By default the Telegram bot polls for updates (works without any inbound connectivity). For lower latency you can switch a channel to webhook mode — Mockarty registers a webhook with Telegram and receives updates on a public endpoint protected by an auto-generated secret:

POST /api/v1/admin/channels/:id/telegram/webhook
{"enabled": true}            # switch to webhook (rotateSecret: true to re-issue the secret)

The mode is also editable in the channel’s settings form (Mode: pull / webhook). Switching back and forth requires no restart.

AI Agent Integration

The AI agent (notifier sub-agent) can send notifications through system channels without credentials:

  1. list_system_channels — returns available channels with IDs
  2. send_via_channel — sends a notification through a channel by ID

Example agent interaction:

User: "Send a summary of today's test results to Slack"
Agent: [calls list_system_channels → finds Slack channel]
Agent: [calls send_via_channel with channel_id, title, text]

The agent can also use direct tools (send_slack, send_telegram, etc.) with explicit credentials if system channels are not configured.

Without AI Agent

The notification system works entirely without the AI agent:

  • Automatic notifications: Events (test completions, fuzzing findings, etc.) trigger notifications through the EventBus → Channel Dispatcher pipeline
  • User preferences: Control which events go where via the preferences matrix
  • Admin broadcasts: Admin can test channels directly from the admin panel

API Endpoints

Admin API

Method Endpoint Description
GET /api/v1/admin/channels List all channels
GET /api/v1/admin/channels/types List supported channel types
POST /api/v1/admin/channels Create a channel
PUT /api/v1/admin/channels/:id Update a channel
DELETE /api/v1/admin/channels/:id Delete a channel
POST /api/v1/admin/channels/:id/test Test a channel
POST /api/v1/admin/channels/test-config Test an unsaved channel config ({type, config, recipient?}; add-channel wizard)
GET /api/v1/admin/channel-delivery/dlq List dead-letter deliveries
GET /api/v1/admin/channel-delivery/retry-queue List deliveries waiting for retry
POST /api/v1/admin/channel-delivery/dlq/:id/requeue Re-queue a dead-letter entry
GET /api/v1/admin/channel-templates List channel message templates
POST /api/v1/admin/channel-templates Upsert a channel message template
DELETE /api/v1/admin/channel-templates/:id Delete a template override
POST /api/v1/admin/channel-templates/preview Render a template against a sample payload without persisting it
GET /api/v1/admin/channel-templates/snippets Catalog of reusable template snippets for the editor
GET /api/v1/notifications/catalog List registered event types (used by the UI router)

Delivery reliability

For a test plan subscription, lastStatus describes its latest dispatch:

  • delivered: every selected recipient was accepted by the sender and the required delivery record was saved. This is not a read receipt.
  • skipped: there were no eligible recipients, or delivery was disabled by their preferences.
  • deferred: a retry was saved for later; this dispatch has not confirmed delivery to every recipient.
  • deduplicated: an earlier accepted dispatch was found; no new send was needed.
  • partial: some recipients were sent the message while others were deferred, skipped, already accepted or failed.
  • error: dispatch failed without a confirmed new send.
  • unknown: the result could not be confirmed. Reconcile the delivery log before resending; a resend can duplicate a message.

A subscription can cover several recipients. Without a new send, pending retries take precedence over earlier acceptance; earlier acceptance with skipped recipients is shown as deduplicated. The delivery log gives each recipient’s result.

The delivery log records accepted sends, duplicates and saved retries. A queued delivery progresses from pending to success, or through retrying to dead_letter when its retry limit is reached (these are channel_delivery_log states; the team-channel subscription log uses delivered/failed). The admin UI under Notification Channels → Delivery Log gives you two views:

  • Dead Letter – deliveries that have used up all retries. You can requeue any entry with one click to send it back through the retry worker.
  • Retry Queue – deliveries currently waiting for their next retry attempt, sorted by next_retry_at.

A leader-only background worker picks up due retries, applies exponential backoff, and moves the row to dead_letter once retry_count >= max_retries.

Per-event message templates

The dispatcher renders every notification through an override-aware template engine. Lookup order is (most specific → least specific):

  1. (eventType, channelType, lang) – fully-specific override
  2. (eventType, channelType, "") – any language
  3. (eventType, "", lang) – any channel
  4. (eventType, "", "") – any channel, any language
  5. Built-in default shipped with the code

Templates use Go text/template syntax and have access to the raw event payload ({{ .Payload.fieldName }}), the resolved title ({{ .Title }}), body ({{ .Body }}), and deep link ({{ .Link }}).

Manage overrides from Notification Channels → Message Templates in the admin UI, or directly via the /api/v1/admin/channel-templates endpoints.

User API

Method Endpoint Description
GET /api/v1/channels List available channels
GET /api/v1/channels/bindings List my channel bindings
POST /api/v1/channels/bindings Connect to a channel
PUT /api/v1/channels/bindings/:id Update binding
DELETE /api/v1/channels/bindings/:id Disconnect
POST /api/v1/channels/telegram/connect Get Telegram deeplink
POST /api/v1/channels/slack/connect Mint the one-time Slack account-link code ({"channelId":"C…"})
POST /api/v1/channels/messenger/connect Mint a one-time link command for Telegram, VK Teams, Mattermost or Rocket.Chat ({"channelId":"…"})
GET /api/v1/channels/preferences Get notification preferences
PUT /api/v1/channels/preferences Update a preference

See Also