name
, description
. After creation, the webhook’s unique id
will be returned in the response. This ID can be used to programmatically submit event payloads to the webhook via the Submit Webhook Event endpointconst axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/webhook';
const data = {
name: "Webhook name",
description: "Webhook description"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});