Skip to main content
VyomFlow can push signed HTTP notifications to your own server whenever an agent run or tool call reaches a notable state — an alternative to holding an open SSE stream for every run.
Webhook registration is a signed-in user’s own account setting on the internal https://api.vyomflow.co.in/api/v1 surface, authenticated with a Clerk session token — not an agent-facing route, and not part of /api/public/v1 or MCP.

Registering an endpoint

rotateSecret is optional and only meaningful on a repeat call (see Rotating your secret below).
Response (200):
secret is a server-generated 32-byte random value returned in plaintext exactly once, in this response. VyomFlow never stores it anywhere you can retrieve it again, so save it immediately — it’s what you use to verify delivery signatures.
Each VyomFlow user has exactly one webhook endpoint. Calling POST /api/v1/webhooks again updates the existing endpoint’s url in place rather than creating a second one.

Rotating your secret

Pass rotateSecret: true on a repeat call to mint a fresh secret. The previous secret moves into secondarySecret and stays valid as a fallback signer for a grace window, so you can update your receiver’s verification logic without dropping in-flight deliveries. rotateSecret is a no-op on the very first registration call — there’s nothing yet to rotate.
There is no global signing-secret environment variable. Every endpoint’s secret is per-user and per-endpoint, returned only in the registration/rotation response above.

Events

Every registered endpoint receives every event type — there is no per-event subscription filtering. All four payloads share runId, chatId, and occurredAt (ISO 8601). Example tool.completed body:

Verifying a delivery

Every delivery carries these headers: Verify with Node’s crypto module, matching the sender’s scheme exactly (${timestamp}.${rawBody}, HMAC-SHA384, hex):
Verify against the raw, unparsed request body — the signature is computed over the literal bytes sent on the wire, not a re-serialized object. Reject any request where the timestamp is more than 300 seconds from your own clock, to guard against replay of an old, legitimately-signed delivery.
If you rotated your secret recently, verify against both secret and secondarySecret (from the registration/rotation response) during the grace window — a delivery may still be signed with either.

Retries

A delivery is retried up to 5 attempts total, with exponential backoff starting at 30 seconds and capping at 10 minutes between attempts (0s, 30s, 90s, 270s, 600s). If all 5 attempts fail, the delivery is marked dead and dropped — there is no further retry and no manual replay mechanism today. Design your receiver to be fast and reliably return a 2xx; treat any non-2xx or timeout as a signal your own endpoint needs attention, since VyomFlow will give up after the 5th attempt.