Create a Webhook

Create a Webhook object

Parameter

Accessible via URL https://api.channel.io/open/v3/webhooks and HTTP POST

📘

Present parameters in POST body. This method accepts application/json

Parameter

Example

Required

Description

Parameter type

name

channelWH

Required

name of Webhook

Body

url

http://www.channel.io/

Required

a URL for Webhook

Body

Example

POST https://api.channel.io/open/v3/webhooks

Your POST request body should look like

{
  "name" : "channelWH",
  "url" : "http://www.channel.io/",
  "keywords": [    
    "YOUR_KEYWORD_1",
    "YOUR_KEYWORD_2",
    ...
  ],
  "watchUserChats": true, 
  "watchMessages": true
}

Response

Returns a newly created Webhook object.

{
  "webhook": {
    "id": "String',
    "channelId": "String",
    "name": "String",
    "url": "String",
    "token": "String",
    "keywords": [
      "YOUR_KEYWORD_1",
      "YOUR_KEYWORD_2",
      ...
    ],
    "createdAt": 1527230737565,
    "watchUserChats": Boolean,
    "watchMessages": Boolean,
    "apiVersion": "String"
  }
}