Webhooks

Webhooks, also called a web callback or HTTP push API, are the API concepts that are getting more and more popular. Thanks to their lightweight and speed they provide data between applications immediately. With webhooks, you can pass and retrieve information from a matched interaction to your web service.

List all Webhooks

Returns list of all created webhooks.

Properties

Property Type Description
id String Webhook id.
name String Webhook name.
url String Webhook public url.
error String Last noted error with your webhook.

Request URL

Response example

[ { “id”: “5a21a9e21ec94a0007f9ac19”, “name”: “Webhook”, “url”: “https://example.com", “error”: “” } ]

Get a specific webhook

Returns a specific webhook object.

Request URL

Response example

{ “id”: “5a21a9e21ec94a0007f9ac19”, “name”: “Webhook example”, “url”: “https://example.com", “token”: “qwerty”, “headers”: [], “auth”: { “username”: “”, “password”: “” }, “error”: { “date”: “2017-12-04T15:06:12.053Z”, “message”: “timeout of 10000ms exceeded” } }

Properties

Property Type Description
id String Webhook id.
name String Webhook name.
url String Webhook url. Must be public url.
token String Token which can be used to verify incoming webhooks.
headers Array.<Object> Array of objects which includes request headers.
auth Object Object for basic auth authorization.
error Object Error object which includes information about last occured error.

Create a webhook

Creates a new webhook.

Request URL

{ “name”: “Webhook name”, “url”: “${WEBHOOK-URL}”, “token”: “”, “headers”: [], “auth”: {} }

Response example

{ “id”: “58ee2e085d033800059a3f7f”, “timestamp”: “2018-01-12T13:40:40.260Z”, “status”: { “code”: 200, “type”: “success” } }

Properties

Property Type Description
name String Webhook name.

String(1, 1024)
url String Webhook public url.
token String Token which can be used to verification incoming webhooks.

String(0, 1024)
headers Array.<Object> Array of objects which includes request headers.

Array(0, 99)
auth Object Object for basic auth authorization.

Update a webhook

Updates a webhook.

Request URL

{ “name”: “Webhook name”, “url”: “${WEBHOOK-URL}”, “token”: “”, “headers”: [], “auth”: {} }

Response example

{ “id”: “58ee2e085d033800059a3f7f”, “timestamp”: “2018-01-12T13:40:40.260Z”, “status”: { “code”: 200, “type”: “success” } }

Properties

Property Type Description
name String Webhook name.

String(1, 1024)
url String Webhook public url.
token String Token which can be used to verification incoming webhooks.

String(0, 1024)
headers Array.<Object> Array of objects which includes request headers.

Array(0, 99)
auth Object Object for basic auth authorization.

Delete a webhook

Removes a webhook.

Request URL

Response example

{ “id”: “58ee2e085d033800059a3f7f”, “timestamp”: “2018-01-12T13:40:40.260Z”, “status”: { “code”: 200, “type”: “success” } }

Common object definitions

headers

Array of request headers.

Property Type Description
name String Header name.

String(1, 128)
value String Header value.

String(1, 1024)

auth

Property Type Description
username String Basic auth username.

String(1, 1024)
password String Basic auth password.

String(1, 1024)
menu