Varmirdocs
Docs/Guides/Webhooks

Webhooks

Get notified when long transcriptions finish or your credits run low. Signed HMAC payloads delivered to any HTTPS endpoint you control.

Coming soon

Not available yet. Webhooks are planned. Today POST /api/v1/transcribe returns the transcript in the same response, so there is nothing to wait for.

Events

TypeDescription
transcription.finishedLong transcription (>5 min) completed.
transcription.failedA transcription job hit an unrecoverable error.
credits.lowCredit balance dropped below 10% of last top-up.
subscription.invoice_paidA monthly invoice was paid successfully.

Payload

All payloads share the same envelope: a type string, a sent_at ISO timestamp and an event-specific data object.

{
  "type": "transcription.finished",
  "sent_at": "2026-06-12T14:05:00Z",
  "data": {
    "id": "tr_8f3a2c",
    "duration_sec": 612.4,
    "language": "en",
    "text_url": "https://files.varmir.com/tr_8f3a2c.txt"
  }
}

Signature verification

Every request carries an X-Varmir-Signature header formatted as sha256=…. Compute the same HMAC over the raw body with your webhook secret and compare in constant time.

verify.ts
import { createHmac } from "crypto";

function verify(rawBody, header, secret) {
  const sig = header.split("sha256=")[1];
  const expected = createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  return sig === expected;
}