const 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);
});