Back to integration guides

Event-driven

Custom Webhooks

Connect any external system to ServoAgent with signed inbound and outbound webhook flows.

Setup time

20 min

Result

Receive and emit webhook events safely

Implementation steps

1

Create an inbound webhook

Register the endpoint, choose the events you need, and keep production and staging secrets separate.

2

Verify the signing secret

Reject deliveries that fail HMAC validation before payload parsing.

import crypto from 'crypto'

const expected = crypto
  .createHmac('sha256', process.env.SERVOAGENT_WEBHOOK_SECRET!)
  .update(rawBody)
  .digest('hex')
3

Persist event IDs for replay protection

Treat event IDs as unique keys so retries and manual replays are safely ignored.