Webhooks requires the SMALL plan or above.
Muut Webhooks are HTTP callbacks triggered by Muut events. They communicate with external web servers using POST requests in JSON format. Webhooks enable you to send custom event notifications to specified services (e.g. Twitter, Asana, or your own creation), which in turn trigger their own actions.
Webhooks are configured to fire a notification upon the occurrence of one or more Muut events.
The available events are as follows:
post
A new thread (with seed post) is createdreply
A reply is made to an existing threadremove
A post or thread is removedlike
A post or thread is likedunlike
A post or thread is unlikedspam
A post or thread is marked as spamunspam
A post or thread is unmarked as spamenter
A user goes onlineleave
A user goes offlineWhen a Muut event of interest occurs, the Webhook sends a corresponding POST request to the service indicated in the URL field. The HTTP header and message body (payload) of the POST request are specified as follows:
The POST requests sent to the servers contain the following special HTTP header fields:
X-Muut-Forum
The unique Muut forum nameX-Muut-Signature
The HMAC of the payload using the Webhook's secret as the key. Only present if secret is provided.The payload of the POST request is in JSON, the native format used throughout the Muut architecture for communication / notification. The specific structure for different Muut event types are illustrated below.
{
"displayname": "John Doe",
"img": "//domain.com/path/to/image.jpg",
"path": "@johndoe"
}
[
"post", // name of the event
{
"path": "/goma/galleries:this-is-a-thread", // path to the thread
"page": { "title": "Exhibitions" } // title of a channel
},
{
"title": "This is a new reply", // title of the thread
"body": [ "Head of the post", "Tail of the post"],
"user": USER OBJECT
}
]
[
"reply", // event name
"/goma/galleries:bar", // path to the thread
{
"body": [ "Head of the post", "Tail of the post"],
"key": "some-reply", // reply key
"user": USER OBJECT
}
]
[
"like", // or any of "unlike", "spam", "unspam", "remove"
"/goma/galleries:this-is-a-thread/some-reply", // path to target of action
USER OBJECT
]
[
"enter", // or "leave"
USER OBJECT
]
To increase productivity in Webhooks development, you can make use of web services to which HTTP requests can be sent in order for you to inspect and debug efficiently. The services that we find useful are listed here for your reference.