Skip to main content
Vertex
Docs/Webhooks & Event Streams
Updated Oct 19, 20266 min readv2.4

Webhooks & Event Streams

Vertex Webhooks notify your backend services whenever asynchronous lifecycle events occur, such as model training completion, batch indexing success, or threshold billing alerts.


Verifying HMAC-SHA256 Signatures

To ensure incoming webhooks originate strictly from Vertex and were not tampered with in transit, every delivery carries an X-Vertex-Signature header:

import crypto from 'node:crypto';

export function verifyWebhookSignature(payload: string, header: string, secret: string): boolean {
  const [tParam, v1Param] = header.split(',');
  const timestamp = tParam.split('=')[1];
  const signature = v1Param.split('=')[1];

  // Prevent replay attacks (5-minute tolerance window)
  const now = Math.floor(Date.now() / 1000);
  if (Math.abs(now - Number(timestamp)) > 300) {
    return false;
  }

  const signedPayload = `${timestamp}.${payload}`;
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(signedPayload)
    .digest('hex');

  return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expectedSignature));
}

Retry Policies & Exponential Backoff

If your receiving webhook server responds with anything other than an HTTP 2xx status, Vertex queues an automatic retry pipeline:

  1. Attempt 1: Immediate delivery
  2. Attempt 2: 15 seconds after failure
  3. Attempt 3: 2 minutes after failure
  4. Attempt 4: 15 minutes after failure
  5. Attempt 5: 1 hour after failure (Dead-letter notify)
Was this documentation page helpful?

Help us improve the Vertex developer experience.