Company Management

Toggle Company Webhook Data Alert

Changed on

Enable 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

Path parameters

companyIdstring required
Example:65f0a1b2c3d4e5f6a7b8c9d0

Unique identifier of the target company

Request body

data_alertboolean required

true to send per-machine data events (hudsonrock:data) instead of the summary alert, false to go back to the summary alert (hudsonrock:alert).

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