Webhook

This documentation describes how to setup Webhooks.

Introduction

Use the Webhook to determine to which endpoint we should forward the Notifications.

Optional: headers may be used to add authorization of webhook calls.

API Reference

Authorization information can be found in Authorization

Set Webhook URL

Request Schema

Method, Endpoint & Header
Body
Method, Endpoint & Header
POST /v1/configs/webhook
D360-API-KEY: API-Key
Content-Type: application/json
Body
{
"url": URL,
"headers": {
"header_1": string,
"header_2": string
}
}

Response Codes

200
40X
500
200
{
"url": URL,
"headers": {
"header_1": string,
"header_2": string
}
}
40X
{
"meta": {
"success": false | true,
"http_code": 40X,
"developer_message": string,
"details": [
string
]
}
}
500
{
"meta": {
"success": false,
"http_code": 500,
"developer_message": string
}
}

Example setting Webhook with Basic Auth

Request
Response
Request
POST /v1/configs/webhook
D360-API-KEY: adafABC43
Content-Type: application/json
{
"url": "https://www.example.com/webhook",
"headers": {
"Authorization": "Basic dGVzdHVzZXI6dGVzdHBhc3M="
}
}
Response
{
"url": "https://www.example.com/webhook",
"headers": {
"Authorization": "Basic dGVzdHVzZXI6dGVzdHBhc3M="
}
}

Get Webhook URL

Request Schema

Method, Endpoint & Header
Body
Method, Endpoint & Header
POST /v1/configs/webhook
D360-API-KEY: API-KEY
Content-Type: application/json
Body

Response Codes

200
40X
500
200
{
"url": URL,
"headers": {
"header_1": string,
"header_2": string
}
}
40X
{
"meta": {
"success": false | true,
"http_code": 40X,
"developer_message": string,
"details": [
string
]
}
}
500
{
"meta": {
"success": false,
"http_code": 500,
"developer_message": string
}
}

Example

Request
Response
Request
POST /v1/configs/webhook
D360-API-KEY: adafABC43
Content-Type: application/json
Response
{
"url": "https://www.example.com/webhook",
"headers": {
"Authorization": "Basic dGVzdHVzZXI6dGVzdHBhc3M="
}
}