Webhooks
Please refer to the Authentication document on how to obtain and use an API key.
Available actions & endpoints
Fetching all webhooks
GET /v1/webhooks (Fetch all webhooks)
URL Parameters
name type data type description None N/A N/A N/A
Query Parameters
name required data type description None N/A N/A N/A
Responses
http code content-type response 200application/jsonSee example response401application/json{"code":401,"message": "Authentication is required to continue"}
Example cURL
curl -X GET -H "api-key: [YOUR API KEY]" https://api.monitor.insites.com/v1/webhooks?webhookUuid=[THE webhookUuid]
Example Response
{
"data": [
{
"uuid": "15022766-dc8f-44c2-9542-b998c6793922",
"endpoint": "https://www.webhook.site/!#/randomhash",
"created_at": "2022-08-31T14:23:40+00:00",
"updated_at": "2022-08-31T14:23:40+00:00",
}
]
}
Creating a webhook
POST /v1/webhooks (Create webhook)
URL Parameters
name required data type description None N/A N/A N/A
Query Parameters
name required data type description None N/A N/A N/A
Responses
http code content-type response 200application/jsonSee example response401application/json{"code":401,"message": "Authentication is required to continue"}
Example cURL
curl -X POST https://api.monitor.insites.com/v1/webhooks
-H "api-key: [YOUR API KEY]"
-H "Content-Type: application/json"
-d "[SEE EXAMPLE REQUEST BODY]"
Example Request Body
{
"hostname": "https://www.insites.com"
}
Example Response
{
"message": "success",
"success": true,
"data": {
"uuid": "15022766-dc8f-44c2-9542-b998c6793922",
"endpoint": "https://www.webhook.site/!#/randomhash",
"created_at": "2022-08-31T14:23:40+00:00",
"updated_at": "2022-08-31T14:23:40+00:00",
}
}
Deleting a webhook
DELETE /v1/webhooks/[webhook_uuid] (Delete webhook)
URL Parameters
name required data type description webhook_uuid Yes string The uuid of the webhook you would like to delete
Query Parameters
name required data type description None N/A N/A N/A
Responses
http code content-type response 200application/json{"success":true,"message":"success"}401application/json{"code":401,"message": "Authentication is required to continue"}
Example cURL
curl -X DELETE https://api.monitor.insites.com/v1/webhooks/[webhook_uuid]
-H "api-key: [YOUR API KEY]"