Company Management

Test Company Webhook

Changed on

Send a single test event to a company webhook so you can validate your receiver before going live.

The request is delivered exactly like a real one: HTTPS POST, Content-Type: application/json, the same {"event": {...}, "sourcetype": "..."} envelope, and your token sent as entered in the auth_header header. Use it to confirm authentication, body parsing, index or sourcetype routing, and any parsing of the MongoDB Extended JSON fields.

  • Event type: by default the test matches the webhook's current mode: a hudsonrock:data event when data_alert is true, otherwise a hudsonrock:alert event. Pass type to test the other format.
  • Test marker: every test event carries "test": true inside event. Real events never include this field, so you can drop test events from production rules and playbooks.
  • Content: test events contain placeholder data only. Summary alerts list the company's monitored domains with zero counts. Data alerts contain one anonymized employee record built around the company's first domain, with TEST- placeholder values for secrets.
  • Unsaved configuration: pass webhook in the body to test a URL, token and header before saving them. Otherwise the company's stored webhook is used; if there is none, 409 Conflict is returned.
  • Result: the response reports whether your endpoint returned a 2xx (delivered), the HTTP status, the response time, the first 1 KB of the response body, and the exact payload we sent. A rejected or unreachable endpoint still returns 200 from this API, with delivered: false.
  • Limits: the test makes one attempt with a 10-second timeout and doesn't follow redirects. Destinations that resolve to private, loopback or link-local addresses are refused. You can send one test per company every 10 seconds; more frequent calls return 429.

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.

post/companies/{companyId}/webhook/test

Request

Path parameters

companyIdstring required
Example:65f0a1b2c3d4e5f6a7b8c9d0

Unique identifier of the target company

Request body

type'alert' | 'data'

alert sends a hudsonrock:alert summary event, data sends a hudsonrock:data event. Defaults to the webhook's current mode (data when data_alert is true).

Example request

{
  "type": "data",
  "webhook": {
    "url": "https://example.com/webhooks/acme",
    "token": "11111111-2222-3333-4444-555555555555",
    "auth_header": "Authorization"
  }
}

Response

The test event was sent (or attempted). Check delivered for the outcome.

deliveredboolean

True when your endpoint responded with a 2xx status.

status_codeinteger nullable

HTTP status returned by your endpoint. Null if no response was received.

response_time_msinteger nullable

Time from sending the request until your endpoint responded, in milliseconds.

response_bodystring nullable

First 1 KB of your endpoint's response body, for debugging.

errorstring nullable

Why no response was received, e.g. a DNS, TLS or connection error, a timeout, or a refused destination. Null when your endpoint responded.

type'alert' | 'data'

Which event format was sent.

Example response

{
  "delivered": true,
  "status_code": 200,
  "response_time_ms": 184,
  "response_body": "{\"text\":\"Success\",\"code\":0}",
  "type": "alert",
  "payload": {
    "event": {
      "Example Corp": {
        "example.com": {
          "employees": 2,
          "third_party": 1,
          "externals": 0,
          "clients": 14,
          "apps": 0,
          "supply_chain": 0
        },
        "example.net": {
          "employees": 0,
          "third_party": 0,
          "externals": 0,
          "clients": 0,
          "apps": 0,
          "supply_chain": 0
        }
      },
      "earliest_timestamp": 1760486400
    },
    "sourcetype": "hudsonrock:alert"
  }
}

Changes