Skip to main content
A connected app (an app the user authorised over OAuth through the hosted MCP server) can ask Sentivel to POST signed incident events to it. It takes one tool call. The user sets nothing up. Use this when you build an app on top of Sentivel. To send alerts to a tool your team already uses, add a Webhook integration instead.

Subscribe

Call sentivel_create_webhook_subscription with an https URL you control.
Request
Response
Store the secret. Sentivel shows it once. Calling again with the same URL keeps the id and returns a new secret, which is also how you recover a lost one.
  • The URL must be https and publicly reachable. Private, loopback, link-local and cloud metadata addresses are refused, and the host is checked again on every send.
  • Each connection or token can hold up to 10 subscriptions.
  • An OAuth connection or an org token can subscribe. A personal token can’t.

What a subscription receives

Every incident event in the workspaces the credential can use at the moment of delivery:
  • For an OAuth connection, the workspaces the user granted, that they still belong to, and whose owner allows connected apps. Sentivel checks this on every attempt.
  • For an org token, its own workspace, while the token is live and can read incidents.
That covers incidents from monitors, incidents opened by hand or from an inbound alert, and incidents at providers the workspace tracks. A subscription isn’t part of any escalation policy, so it receives every event in scope. Sentivel sends incident.updated when an incident gets a new update or changes status. An incident first seen already resolved sends nothing. Revoking the connection under Account → Connections deletes its subscriptions. So does revoking the org token.

Handle a delivery

Each event arrives as a POST.
Headers
Body

Verify the signature

Sentivel-Signature is t=<unix seconds>,v1=<hex HMAC-SHA256>. The HMAC is keyed with the whole whsec_… secret over "<t>.<raw body>".
  1. Read the raw body before parsing it.
  2. Compute the HMAC and compare it with v1 in constant time.
  3. Refuse a t more than 5 minutes from your clock, so a captured request can’t be replayed.
verify.ts
Each retry is signed again with a new t. The body doesn’t change.

Respond

  • Answer with any 2xx within 10 seconds. Redirects aren’t followed.
  • A timeout, a connection error, 408, 429 or any 5xx is retried with backoff for 30 minutes.
  • Any other 4xx stops that event.
  • 410 Gone also deletes the subscription. Return it when the subscriber no longer exists on your side.
Delivery is at least once, and a retried event can arrive out of order. Deduplicate on id, and use status or created_at to order what you show.