Company Management
Toggle Company Webhook Data Alert
Changed onEnable or disable data alerts (webhook.data_alert) on an existing company webhook without resending the webhook URL or token. The company must already have a webhook configured; otherwise 409 Conflict is returned.
Enabling data alerts switches the webhook from the summary hudsonrock:alert event to per-machine hudsonrock:data events; the two modes don't run together. See Set Company Webhook for the full payload and delivery reference.
If the authenticated user belongs to an organization with synced_data: true, only the user with organization.role: "owner" can call this endpoint. Other members receive 403 Forbidden.
patch/companies/{companyId}/webhook/data-alert
Request
- Base URLhttps://api.hudsonrock.com/json/v3
- AuthAPI key in header api-key
- TypeScripthttps://skmtc.dev/hudsonrock/apis/cavalier-api/docs/companies/:companyId/webhook/data-alert/patch.tsA function with typed inputs. Its response is checked against the schema.
Path parameters
companyIdstring required
Example:65f0a1b2c3d4e5f6a7b8c9d0
Unique identifier of the target company
Request body
Example request
{
"data_alert": true
}Response
Updated list of companies for the authenticated user
Example response
{
"companies": [
{
"_id": "65f0a1b2c3d4e5f6a7b8c9d0",
"name": "Acme Corp",
"alerts": true,
"data": {
"domains": [
"acme.com"
],
"apks": [
"com.acme.app"
],
"external_domains": [
"vendor.com"
],
"webhook": {
"url": "https://example.com/webhooks/acme",
"token": "11111111-2222-3333-4444-555555555555",
"auth_header": "Authorization",
"data_alert": true
}
}
}
]
}Changes
- info
endpoint added
- info