Overview
A client-mode connector for a curated messaging slice of the Mattermost API v4:
Default
BASE_ADDRESS is https://YOUR_MATTERMOST_HOST (site origin — not including /api/v4). Topics use messaging/mattermost/<object>/<verb>.
Outgoing webhooks and slash commands that Mattermost POSTs to your infrastructure need a companion ENABLE_SERVER connector (document only here).
REST v4 methods send
Authorization: Bearer {token} (personal access token). Incoming webhook execute uses only the hook id in the path — do not send a Bearer header on that event. Prefer Hub secrets (MATTERMOST_TOKEN, and site origin via MATTERMOST_BASE_URL / MATTERMOST_HOST). Status remains blocked until an authenticated live smoke succeeds.Basic Syntax
Events
Auth
- On your Mattermost server, create a personal access token for a lab user with
create_post(and related) permissions. Copy the token once. - Set connector
BASE_ADDRESSto the site origin (e.g.https://mattermost.example.com) — do not append/api/v4. - For REST events, pass
tokenon the MQTT payload soAuthorization: Bearer {value.json.token}resolves. - For incoming webhooks, create an Incoming Webhook in Mattermost Integrations and pass
hook_id(the id segment after/hooks/); do not send a Bearer header on Executeincomingwebhook. - Store secrets in Hub /
GET SECRET "MATTERMOST_TOKEN". Optional site URL secrets:MATTERMOST_BASE_URLorMATTERMOST_HOST. Never commit real credentials. - Successful
GET /api/v4/users/mereturns HTTP 200 with a user JSON object.POST /api/v4/postsreturns 201. Incoming webhook execute typically returns 200 with bodyok.
Example payloads
getUsersMe:Deploy notes
- Deployable file:
MattermostRestApi.lot— noADD METADATA. - Hub sidecar:
hub-metadata.lotwithWITH STATUS "beta",WITH CATEGORY "REST API Routes", andWITH DOCLINKto this page. - Suggested branches:
feat/rest-api-route-mattermost(broker examples) andfeat/docs-rest-api-mattermost(Mintlify). Hugo owns GitHub pushes.

