Webhooks
Get a finished transcript posted to your server, signed so you know it came from us.
Needs batch transcription
Webhooks deliver the transcripts of files, so they work once batch is open on your workspace (Batch transcription).
A webhook is an address on your server. When a file's transcript is done, the API posts it there, so you need no polling. Webhooks belong to the workspace: an Admin key creates and changes them, and any key's jobs can send their results to one by its id.
Create the webhook once
Give it the address of your receiver. The API must be able to reach it from the internet (Create a webhook has the rules). Owners and admins of the workspace can also add one on the console's Webhooks page.
A webhook gets both events, or only the one you choose with events: say the failures to an alerting tool and the transcripts to a CRM, each with a webhook of its own. The console's Webhooks page sets this too.
curl -sS -H "Authorization: Bearer $VATIS_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://crm.example.com/vatis", "name": "crm"}' https://api.eu.vatis.tech/v1/webhooksExpected result: 201 and the webhook, with its secret. The secret is shown only this once: keep it with your receiver, which checks every delivery with it.
{"id": "wh_a97581d905c54b46", "url": "https://crm.example.com/vatis", "name": "crm", "enabled": true, "retry": true,
"headers": {}, "created_at": "2026-11-12T09:14:03Z", "secret": "whsec_..."}Send each file with its webhook
Add webhook_id to the request, and metadata to recognise the result when it comes back. webhook=true instead posts to every webhook that is turned on.
WEBHOOK_ID=wh_a97581d905c54b46 # the "id" of your webhook
curl -sS -H "Authorization: Bearer $VATIS_KEY" https://api.eu.vatis.tech/v1/speech-to-text \
-F model_id=vatis_ro_v9 -F webhook_id=$WEBHOOK_ID -F metadata='{"case": "2026-118"}' -F file=@speech.wavExpected result: the answer comes at once, as for every request, with the transcript queued: {"id": "tr_bcf217549e124b7a", "status": "queued", ...}.
Receive the result
When the transcript is done, your address gets a POST with a JSON body:
{"event": "transcript.completed", "created_at": 1794474845,
"data": {"id": "tr_bcf217549e124b7a", "status": "completed", "metadata": {"case": "2026-118"}, "text": "...", "words": [...], "segments": [...], "speakers": [...]}}data is the whole transcript (The transcript object). A transcription that failed posts transcript.failed, with data.status failed and data.error. Your receiver must:
- Check the signature of the raw body, before anything else, and answer
401if it is wrong (Check the signature). - Answer
2xxat once, then process the result. A slow answer, or an error, makes the API try again later. - Process each
data.idonce. A result can arrive twice, for example when your answer was lost.
Check the signature
Every delivery carries a Vatis-Signature header: Vatis-Signature: t=1794474845,v1=5f0c3c4e...
tis when it was signed, in Unix seconds. Refuse atmore than 5 minutes away from now: an old delivery sent again by someone else.v1is the HMAC-SHA256 of<t>.<raw body>with your webhook's secret, in hex. Compare it in constant time, on the raw bytes as they arrived, before parsing them.- Never accept a delivery without the header.
A small receiver that checks each delivery, on port 8080, with its language's standard library (C#: an ASP.NET Core app, from dotnet new web):
// node receiver.mjs, with the webhook's secret in VATIS_WEBHOOK_SECRET
import { createHmac, timingSafeEqual } from "node:crypto";
import { createServer } from "node:http";
// Vatis-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" with the webhook's secret>
function verify(rawBody, header, secret, toleranceS = 300) {
const parts = Object.fromEntries((header ?? "").split(",").map((p) => [p.slice(0, p.indexOf("=")), p.slice(p.indexOf("=") + 1)]));
const t = Number(parts.t);
if (!Number.isInteger(t) || !parts.v1 || Math.abs(Date.now() / 1000 - t) > toleranceS) return false; // missing, or replayed
const expected = Buffer.from(createHmac("sha256", secret).update(`${parts.t}.`).update(rawBody).digest("hex"));
const given = Buffer.from(parts.v1);
return given.length === expected.length && timingSafeEqual(given, expected); // takes the same time, right or wrong
}
createServer(async (request, response) => {
const chunks = [];
for await (const chunk of request) chunks.push(chunk);
const rawBody = Buffer.concat(chunks); // the bytes as signed, not the parsed JSON
if (!verify(rawBody, request.headers["vatis-signature"], process.env.VATIS_WEBHOOK_SECRET)) {
response.writeHead(401).end();
return;
}
response.writeHead(204).end(); // answer at once, then process
const delivery = JSON.parse(rawBody);
console.log(delivery.event, delivery.data.id, delivery.data.metadata);
}).listen(8080);Keep your server's clock right: the 5 minute window depends on it.
To check your receiver, send it a test event from the console's Webhooks page (the webhook's menu, Send test event). A test is signed like any delivery and never retried, and its data.id is always tr_0000000000000000, so your receiver can tell it from a real job.
Deliveries
| What | Rule |
|---|---|
| Events | transcript.completed, transcript.failed. |
| Body | {"event", "created_at", "data"}, fixed when the job ends. created_at: Unix seconds, when the job ended. data: the whole transcript object, with its words, segments and exports. |
| Targets | The webhook of webhook_id, or every webhook enabled when the job ends (webhook=true), if it has the event in its events. A job that names a webhook without its event sends it nothing. |
| Headers | Content-Type: application/json, Vatis-Signature, and the webhook's own headers. |
| Signature | Signed again at each attempt, with a new t. |
| Success | Any 2xx answer, within 15 s for the whole attempt. The body of your answer is not read. |
| Retries | After a 5xx, 408 or 429 answer, a timeout or a connection error: 5 more attempts, about 30 s, 2 min, 8 min, 30 min and 30 min apart, unless the webhook's retry is off. Pending deliveries are not lost when the service restarts. |
| Not retried | Other 4xx answers, redirects (a 3xx is not followed), and an address the API may not reach. |
store=false | The transcript and its upload are deleted after the last delivery attempt. |
Manage webhooks
With an Admin key. A Member key gets 403 admin_only, though its jobs can still use a webhook by its id.
Create a webhook
POST/v1/webhooks
Body: a JSON object. Answers 201 and the webhook with its secret, shown only here.
| Field | Values | Default | What it does |
|---|---|---|---|
url | http:// or https://, up to 2048 characters | required | Where deliveries go. |
name | up to 200 characters, or null | A name for your own use. | |
headers | a JSON object of strings | Your own headers, sent with each delivery. | |
retry | true, false | true | Retry failed deliveries. |
events | a JSON list of transcript.completed, transcript.failed or both | both | Which ends of a batch job it gets. |
urlmust be reachable from the internet: loopback, link-local and private network addresses are refused (400invalid_parameter). A name that leads to one passes here, and its deliveries then fail without a retry.headers: at most 20; valid header names up to 256 characters; values of printable ASCII up to 4096 characters. NotContent-Type,Content-Length,Host,Vatis-Signature,Transfer-Encoding,Connection,Keep-Alive,Upgrade,TE,Trailer,Expect, or anyProxy-header.events: each once; an empty list or another name is400invalid_parameter.- At most 50 webhooks in a workspace: the 51st is
400invalid_request. - The secret cannot be changed: create a new webhook, move your receiver to its secret, then delete the old one.
- A new webhook is on (
enabledtrue).enabledis not a field here: turn it off with an update.
List webhooks
GET/v1/webhooks
The workspace's webhooks, oldest first, never with their secrets.
curl -sS -H "Authorization: Bearer $VATIS_KEY" https://api.eu.vatis.tech/v1/webhooks{"webhooks": [{"id": "wh_a97581d905c54b46", "url": "https://crm.example.com/vatis", "name": "crm", "enabled": true,
"retry": true, "headers": {}, "events": ["transcript.completed", "transcript.failed"],
"created_at": "2026-11-12T09:14:03Z"}]}| Field | What it is |
|---|---|
id | wh_ and 16 hex digits. |
url | Where deliveries go. |
name | Your name for it, or null. |
enabled | Whether deliveries go out. |
retry | Whether failed deliveries are retried. |
headers | Your own headers for each delivery, {} when there are none. |
events | The events it gets: transcript.completed, transcript.failed or both, in that order. |
created_at | ISO 8601, UTC. |
Update a webhook
PATCH/v1/webhooks/{id}
Send only the fields to change: any of url, name, enabled, retry, headers, events, with the rules of Create a webhook. headers and events replace the whole list. Answers 200 and the webhook, without its secret.
curl -sS -X PATCH -H "Authorization: Bearer $VATIS_KEY" -H "Content-Type: application/json" \
-d '{"enabled": false}' https://api.eu.vatis.tech/v1/webhooks/wh_a97581d905c54b46Expected result: the webhook, with "enabled": false. Jobs sent with its id are then refused (400 invalid_parameter, param webhook_id).
Delete a webhook
DELETE/v1/webhooks/{id}
Deletes the webhook, and drops the deliveries still pending for it. Answers 204, with no body.
curl -sS -X DELETE -H "Authorization: Bearer $VATIS_KEY" -w "%{http_code}\n" https://api.eu.vatis.tech/v1/webhooks/wh_a97581d905c54b46Errors when managing webhooks
| Status and code | When |
|---|---|
400 missing_parameter | No url when creating one. |
400 invalid_parameter | A field unknown or not valid, or a query parameter (these endpoints take none). param names it. |
400 invalid_request | A body that is not a JSON object, or a 51st webhook. |
401 unauthorized | No key, or a wrong, revoked or expired one. |
403 admin_only | A Member key. |
404 not_found | An unknown webhook id. |
413 request_too_large | A body over 64 KB. |
Next steps
- Keeping nothing: delete each transcript after its delivery, with
store=false. - Files with the transcript itself: text and subtitles in the delivery.
- Errors: every code, and what to do about it.