Update a webhook
Make changes to existing webhook.
Paramaters​
id
- place in url​
Place the webhook id in the URL: webhooks/update/wh_....
name
- required​
Name of webhook.
url
- required​
URL for the webhook to POST to.
port
- optioal​
The port for the webhook. Defaults to 80.
Code Example​
- NodeJS
PUT - https://api.particlespace.com/api/v1/webhooks/:id
var axios = require('axios');
var qs = require('qs');
const BEARER_TOKEN = 'SET_ME';
var data = qs.stringify({
'name': 'open house data',
'url': 'https://api.example.com/example',
'port': 80,
});
var config = {
method: 'put',
url: 'https://api.particlespace.com/api/v1/webhooks/WEBHOOK_ID_HERE',
headers: {
'Authorization': 'Bearer ' + BEARER_TOKEN
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});