Submit Webhook Event Data
This API endpoint allows you to submit data to a specific webhook by providing the webhook ID in the path. The request body accepts arbitrary key-value data to be processed by the webhook.

Expected Behavior:


  • On success, the webhook will process the data and return a confirmation message along with additional meta information such as the IP address and content type.
  • If the webhook ID is invalid, an error message will be returned.
Path Parameters
  • id string
    The unique ID of the webhook created earlier.
Request Body Parameters
  • body object
    Key-value data to be submitted to the webhook.
JavaScript
Response codes
const axios = require('axios');

const url = 'https://data-gateway.api.pinghome.io/v1/incident/webhook/{id}';
const data = {
  example_key: 'example_value'
};

axios.post(url, data, {
  headers: {
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).