Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To create a new web hook please follow these steps;

  • Open a channel that where you want to create a web hook

  • Select "Edit" from the channel menu

  • Switch to the "Web Hooks" tabs and click on to "Add New" button

  • Web hook Url URL is automatically generated, enter the purpose of the channel

  • Click the "Copy" button on next to the Url field to copy Url to the clipboard.

  • Click Ok to save changes.

...

Posting Channel Activity

After the web hook is created you can post JSON data to create a new activity on the channel. Web hook URL contains all the required information and does not need any authentication.

...

Posting Message with Attachments

As another example, you can post the following JSON to send a message with attachments. 

...

Creating a New Case In Channel

When JSON data contains a an "id" property, web hook creates a new case instead of just posting a message. Id field must be unique for the channel or otherwise, the web hook ignores the message and returns the already reported status.

Code Block
POST /hooks/channels/f923d83a-3350-42d0-b9cb-620032730294/8459b574-62ea-4ea7-bbae-a132fbfee5df
Host: my.emakin.com
Content-Type: application/json

{
    "id" : "event1",
	"text" : "my message",
    "attachments" : [
    {
        "@type": "file",
        "displayName": "my file",
        "ext": "txt",
        "url": "http://myserver/myfile"
    },
    {
        "@type": "link",
        "url": "http://www.google.com",
        "displayName": "http://www.google.com"
    }]
}

...

Updating a Case

Web hooks also supports to receive support receiving notifications about previously posted messages.

...