Skip to main content

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
nametypedata typedescription
NoneN/AN/AN/A
Query Parameters
namerequireddata typedescription
NoneN/AN/AN/A
Responses
http codecontent-typeresponse
200application/jsonSee example response
401application/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
namerequireddata typedescription
NoneN/AN/AN/A
Query Parameters
namerequireddata typedescription
NoneN/AN/AN/A
Responses
http codecontent-typeresponse
200application/jsonSee example response
401application/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
namerequireddata typedescription
webhook_uuidYesstringThe uuid of the webhook you would like to delete
Query Parameters
namerequireddata typedescription
NoneN/AN/AN/A
Responses
http codecontent-typeresponse
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]"