Skip to content
Open
Changes from 2 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
7 changes: 4 additions & 3 deletions site/content/integrate/webhooks/incoming/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ A successful request will get the following response:

```
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Type: application/json
Comment thread
hanzei marked this conversation as resolved.
Outdated
X-Request-Id: hoan6o9ws7rp5xj7wu9rmysrte
X-Version-Id: 4.7.1.dev.12799cd77e172e8a2eba0f9091ec1471.false
Date: Sun, 04 Mar 2018 17:19:09 GMT
Content-Length: 2

ok
```

Followed by a JSON representation of the created message. This representation follows the format used by the [Create Post API endpoint](https://api.mattermost.com/#tag/posts/operation/CreatePost).

All webhook posts will display a `BOT` indicator next to the username in Mattermost clients to help prevent against {{< newtabref href="https://en.wikipedia.org/wiki/Phishing" title="phishing attacks" >}}.


Expand All @@ -76,6 +76,7 @@ Incoming webhooks support more than just the `text` field. Here is a full list o
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------|
| `text` | {{<newtabref title="Markdown-formatted" href="https://docs.mattermost.com/messaging/formatting-text.html">}} message to display in the post.<br/>To trigger notifications, use `@<username>`, `@channel`, and `@here` like you would in other Mattermost messages. | If `attachments` is not set, yes |
| `channel` | Overrides the channel the message posts in. Use the channel's name and not the display name, e.g. use `town-square`, not `Town Square`.<br/>Use an "@" followed by a username to send to a Direct Message.<br/>Defaults to the channel set during webhook creation.<br/>The webhook can post to any Public channel and Private channel the webhook creator is in.<br/>Posts to Direct Messages will appear in the Direct Message between the targeted user and the webhook creator. | No |
| `root_id` | Root message of the thread the message posts in. | No |
| `username` | Overrides the username the message posts as.<br/>Defaults to the username set during webhook creation; if no username was set during creation, `webhook` is used.<br/>The {{<newtabref title="Enable integrations to override usernames" href="https://docs.mattermost.com/configure/configuration-settings.html#enable-integrations-to-override-usernames">}} configuration setting must be enabled for the username override to take effect. | No |
| `icon_url` | Overrides the profile picture the message posts with.<br/>Defaults to the URL set during webhook creation; if no icon was set during creation, the standard webhook icon ({{<compass-icon icon-webhook>}}) is displayed.<br/>The {{<newtabref title="Enable integrations to override profile picture icons" href="https://docs.mattermost.com/configure/configuration-settings.html#enable-integrations-to-override-profile-picture-icons">}} configuration setting must be enabled for the icon override to take effect. | No |
| `icon_emoji` | Overrides the profile picture and `icon_url` parameter.<br/>Defaults to none and is not set during webhook creation.<br/>The expected value is an emoji name as typed in a message, either with or without colons (`:`).<br/>The {{<newtabref title="Enable integrations to override profile picture icons" href="https://docs.mattermost.com/configure/configuration-settings.html#enable-integrations-to-override-profile-picture-icons">}} configuration setting must be enabled for the override to take effect.. | No |
Expand Down