Speechmatics webhooks
Speechmatics webhooks, which its docs call notifications, are the HTTP requests a batch transcription job sends to each URL in its notification_config when the job finishes.
How Speechmatics webhooks work
A notification saves you polling the jobs API for a finished transcript. Notifications are configured on the job: you add notification_config to the job config when you submit the job, with up to 3 URLs. Speechmatics calls each one with POST, or PUT if that entry sets method, and callbacks run in parallel.
Speechmatics has no event types, envelope or version for these requests. It appends the job ID and outcome to your URL, as in ?id=r6sr3jlzjj&status=success, where status is success, error, fetch_error or trim_error. These aren't the job status values from the jobs API. The body is whatever the entry lists in contents: one item is sent as the raw body and two or more as multipart/form-data, so branch on Content-Type before you parse.
Key facts
JSON Content type: application/json, text/plain, multipart/form-data, application/octet-stream.
Setting up Speechmatics webhooks
- Add a
notification_configentry to the job config withurl,contentsandauth_headers. It belongs to the job, so every job your code submits must carry it. - Generate a long random value and send it as a
Name: valuestring inauth_headers. It's the credential your service accepts, not your Speechmatics API key. - Test through a public URL:
hookdeck listen 3000 speechmatics --path /webhooks/speechmaticsgives you one and forwards requests to your machine. Submit a short audio file withcontentsset tojobinfo. - Speechmatics documents no way to resend a notification. Fetch the result from the API by job ID, or submit the job again.
Delivery behaviour
Not documented the failure example on the docs page records a client timeout as a failed attempt Retries Until a set threshold after any non-2xx; the threshold and interval aren't stated, and the docs' example ends after about a minute After retries Recorded on the job in errors on GET /jobs/{id}, and the transcript stays in the API for 7 days Ordering Any order callbacks run in parallel and may complete in any order Known failure modes
From Hookdeck's Speechmatics guide →-
Your outage outlasts the retries
Speechmatics retries a non-2xx until a threshold its docs don't state, and the example on its page ends after four attempts in about a minute. The transcript stays in the API for 7 days, so fetch what you missed from there.
Recover missed notifications → -
The same notification arrives twice
Speechmatics sends a notification again after a non-2xx or a timeout, so a handler that finished late can see it twice. It documents no delivery ID, so deduplicate on the job
Handle duplicates →idandstatus. -
The body isn't the shape you expected
The body depends on
Tell notifications apart →contents, and Speechmatics' two docs pages disagree on what a missingcontentssends. Setcontentson every notification and branch onContent-Typebefore you parse. -
A 413 is retried, not dropped
If a body is too large for your server, the
Size limits →413counts as a failed delivery and Speechmatics sends it again. Raise your size limit to fit what you request, or stop requestingdata.
Speechmatics webhook best practices
- Return a 2xx quickly. Speechmatics doesn't state its response timeout. Check the header, store the notification, respond, and do the work afterwards.
- Deduplicate on the job and its status.
Retries can repeat a notification, and Speechmatics documents no delivery ID. Record the job
idwithstatus, plus the content you requested if one endpoint receives several. - Wait for every callback you need. Callbacks run in parallel, and some can succeed while others fail. Key each by job ID and content, and start a dependent step once all of them are present.
- Check for jobs that never called back. Run a periodic check for finished jobs with no callback, and fetch their results from the API within the 7-day retention period.
- Set contents on every notification.
An empty list and a missing field behave differently, so name what you want. Request
jobinfoor one transcript format, and leavedataout unless you need the media back. - Build the job config in one place. The header lives on each job, so a single function keeps it from being forgotten and makes rotating the value a one-line change.
In this hub
| MCP events → | How an agent subscribes to Speechmatics events as MCP events. |
| Verify signatures → | Signature facts, verification code and common failures. |
| Production guide → | Production problems, such as timeouts and retries, and how to handle them. |
| Agent skill → | Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill speechmatics-webhooks |
Keep an outage on your side from outlasting Speechmatics' retries.
Speechmatics stops retrying at a threshold its docs don't state. Event Gateway checks the header you set on each notification, stores it and retries to your service on your schedule.