const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team";
const data = {
"name": "TeamName"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/v1/teams";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8";
const data = {
"name": "TeamName"
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/v1/team/6fb4e64f-ad18-46e3-920c-92639adb137c/invitations";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/invitation";
const data = {
"channel_value": "test@pinghome.eu",
"channel_type": "email"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/invitation";
const data = {
"channel_value": "test@pinghome.eu"
};
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
data: data
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/v1/team/6fb4e64f-ad18-46e3-920c-92639adb137c/members";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/member/a43b87f6-9012-4f1e-bf5f-7c2f5b6e4f29";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/member/a43b87f6-9012-4f1e-bf5f-7c2f5b6e4f29";
const data = {
"role": "user",
"new_team_id": "c03b02ec-244f-4d2c-8f68-3910071ed5c8"
};
axios.patch(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/invitation/reminder";
const data = {
"channel_value": "test@pinghome.eu"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
"value": "https://webhook.site/3f4db7ad-ca7f-4080-ab06-6056ea9eed3a",
"type": "webhook"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/v1/team/{id}/notification-channels?include_types=sms,email&exclude_types=push-notification";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
"value": "https://webhook.site/3f4db7ad-ca7f-4080-ab06-6056ea9eed3a",
"priority": 1
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/verification";
const data = {
"code": "087608",
"priority": 1
};
axios.patch(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel?priority=3,4";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/test";
const data = {
"priority": 1
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/enabled";
const data = {
"enabled": true,
"priority": 1
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/v1/service';
const data = {
name: 'ServiceName',
team_id: '39ed7fbd-200b-41eb-8467-a91f0809e802'
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/v1/service/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
const data = { name: 'ServiceName' };
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/v1/service/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log('Service deleted successfully');
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/v1/team-service/b39c7ff9-2ead-4a0d-a095-320b77d8bbdb';
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});