var request = require("request");
var options = {
method: "POST",
url: "https://api.theauthapi.com/webhooks",
headers: {
"x-api-key": "REPLACE_WITH_YOUR_ACCESS_KEY_FOUND_IN_YOUR_ACCOUNT",
},
body: '{\n "name": "only required fields webhook",\n "url": "https://webhook.site/3d224d6e-b525-45dd-9a60-5581df9264b9",\n "projectId": "REPLACE_WITH_YOUR_PROJECT_ID",\n "topics": [\n "api-key.created"\n ],\n "httpMethod": "POST",\n "status": "live"\n}',
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});