How Webhooks Work for Asynchronous Transcription Jobs

A webhook for an asynchronous transcription job is an HTTP POST that the transcription service sends to an address you choose when the job finishes, so you don't have to keep asking whether it's done. With DeProcess you pass an https webhook_url along with "async": true, and when the job ends DePro POSTs the job id, its status (done or failed), any error and the result. Your endpoint should answer quickly with a 2xx status, then confirm and process the job in the background.
Key takeaways
- DeProcess sends a webhook only for async jobs that include an https webhook_url.
- The payload carries id, type, status, error and result (text, segments, language, duration); failed jobs arrive with status failed and are not charged.
- Answer with a 2xx right away and do the heavy work afterwards; GitHub, for example, treats a reply slower than 10 seconds as a failed delivery.
- Make the handler safe to run twice for the same job id, and don't assume deliveries arrive in order.
- The DePro docs don't describe a signature header or redelivery, so confirm each job with GET /v1/jobs/{id} and keep polling as a backup.
How do webhooks work for asynchronous transcription jobs?
A webhook turns "are you done yet?" into "tell me when you're done". You give the transcription service a URL when you submit the job, and when the job ends the service sends an HTTP POST to that URL with the outcome. Your server receives it like any other request.
Asynchronous transcription needs this because long recordings take time. The submit request returns a job id straight away, and the transcript arrives minutes or hours later, after the job has waited in a queue and run. The guide to how batch speech to text works explains that queue; this guide is about the moment the result comes back.
The whole round trip with DeProcess:
- Your code POSTs to
/v1/audio/transcriptionswith aurl,"async": trueand awebhook_url. - DePro answers at once with a job id and status
queued. - The job runs on a computer on the network.
- When it finishes, DePro POSTs the result to your
webhook_url. - Your endpoint answers 2xx, then stores or processes the transcript.
The submit step, with the parameters, is covered in transcribing long audio files with an API.
What does DeProcess send to your webhook?
DePro sends a JSON body with the job and its result. This is the payload shown in the webhook docs:
{ "id": "a1b2c3d4e5f6", "type": "transcribe", "status": "done", "error": null, "result": { "text": "…", "segments": [ … ], "language": "en", "duration": 3612.5 } }
| Field | Meaning |
|---|---|
id | The job id you got when you submitted it. Use it to match the webhook to your record. |
type | The job type, transcribe for speech to text. |
status | done, or failed if the job failed after retries. |
error | null when done; an error message when failed. |
result | The transcript: text, timestamped segments, language and duration (seconds). |
The rules from the docs:
- You only get a webhook for an async job that includes a
webhook_url, and the address must be https. - If a job fails after retries, the webhook arrives with
"status": "failed"and anerrormessage. You aren't charged for failed jobs. - The payload has text and segments. For subtitles, fetch the job with
?format=srtor?format=vttwhen the webhook arrives; see SRT and VTT subtitles from an API.
How should your endpoint respond?
Reply fast and do the real work later. The DePro docs say to answer quickly with a 2xx status and do the heavy work afterwards. Other webhook senders are stricter about time: GitHub's best-practices page says your server should respond with a 2xx within 10 seconds, or GitHub ends the connection and counts the delivery as failed. Stripe's webhook docs say an endpoint must return a 2xx before any complex logic that could cause a timeout.
The usual pattern is to record the job id, put it on a queue, and return. A background worker then fetches, saves and processes the transcript. Here is a minimal receiver in JavaScript using only Node's built-in http module, with a secret token in the path:
import http from "node:http";const queue = [];http.createServer((req, res) => {if (req.method !== "POST" || req.url !== "/hooks/depro/" + process.env.HOOK_TOKEN) { res.writeHead(404).end(); return; }let raw = "";req.on("data", (c) => (raw += c));req.on("end", () => { try { queue.push(JSON.parse(raw).id); } catch {} res.writeHead(204).end(); });}).listen(3000);
Your webhook_url is then https://your-app.com/hooks/depro/ followed by your token, served over https by your hosting or a proxy in front of the app. We ran this receiver with Node 22 on November 10, 2026: a POST with the DePro payload got 204 and queued the job id; a POST to a wrong token got 404. The worker that reads queue does the slow parts: fetching the result, saving it and starting whatever comes next.
How do you keep a webhook endpoint secure?
Treat every incoming webhook as a hint, not as proof. Anyone who learns your webhook URL can POST to it. Webhook providers handle this in different ways: GitHub recommends a webhook secret and HTTPS, and Stripe signs each event so you can verify it. The DePro docs don't describe a signature header, so use checks that don't depend on one:
- Put a long random token in the URL, as in the example above, and keep it out of logs and client-side code. This stops casual or guessed requests.
- Confirm with the API. Take the job id from the webhook and call
GET /v1/jobs/{id}with your own key. Only a real job on your account answers; anything else returns 404. Store the result from that call, not from the webhook body. - Accept only job ids you created. Keep a record of what you submitted and ignore webhooks for ids you don't recognize.
- Use HTTPS. DeProcess requires an https
webhook_url, which keeps transcripts encrypted in transit.
Confirming with the API also gives you the result in any format, since the job endpoint takes ?format=srt, vtt, text, json or verbose_json (transcript formats).
What if a webhook arrives twice, late, or not at all?
Build for all three. Stripe's docs note that endpoints might occasionally receive the same event more than once and recommend logging the ids you've processed. They also say Stripe doesn't guarantee events arrive in the order they were generated. GitHub's page describes replay attacks, where someone re-sends a captured delivery, and recommends checking that each delivery is unique.
For transcription jobs that comes down to three habits:
- Make processing idempotent. Key everything on the job id. If the job is already saved as done, a second webhook changes nothing.
- Don't depend on order. Each job is independent; handle each webhook on its own.
- Poll as a safety net. The DePro docs don't describe redelivery of a missed webhook. Keep a list of submitted jobs, and on a schedule poll any that are still waiting with
GET /v1/jobs/{id}, which returnsqueued,running,doneorfailed. Results stay available for 30 days after a job finishes.
When is polling the better choice?
Polling is better when you can't run a public https endpoint, when you submit only a handful of jobs, or while you're still building. A loop that checks each job every minute or so is simple and reliable. Webhooks pay off with volume: hundreds of jobs a day, many finishing at different times, without hundreds of status requests.
You can also mix them: webhooks for speed, polling for anything that falls through. That combination is the most robust setup.
What about live transcription?
Webhooks are for jobs that finish later, not for words while someone is talking. If you need text during a call or an event, use a live (streaming) transcription service built for that. DeProcess is built for recorded audio processed in batches, at $0.12 per audio hour billed by the minute (DePro pricing), which is where webhooks fit best.
Frequently asked questions
Do I need a webhook, or can I poll?
Either works. Polling GET /v1/jobs/{id} is simpler to start with and needs no public endpoint. Webhooks save requests and tell you sooner when you run many jobs. Many teams use a webhook and poll as a safety net.
Can I test a webhook on my laptop?
Your laptop usually isn't reachable from the internet, so the service can't POST to it directly. Use a tunneling tool or deploy a small test endpoint, and remember that DeProcess requires an https address.
Does the webhook include subtitles?
The DeProcess payload includes the text and timestamped segments. For SRT or VTT, fetch the job with ?format=srt or ?format=vtt when the webhook arrives.
What if my server is down when the webhook is sent?
Don't rely on the webhook alone. Keep a list of jobs you submitted and poll any that haven't reported back after a while; the result stays available for 30 days after the job finishes.
Sources
- DeProcess: API docs (webhooks, job status, errors)
- GitHub Docs: Best practices for using webhooks
- Stripe Docs: Receive Stripe events in your webhook endpoint
Have recordings to transcribe?
Test DeProcess on your own audio. Ask for a free 10-hour test, or start with the free credit every new account gets. Same API format as OpenAI.
Start a free testHave a computer that sits idle?
Install the DePro app and your computer works on AI jobs while you’re away. Free to join, about five minutes to set up.
Join with your computerRelated guides
- Speech to textHow to Transcribe Long Audio Files (Hours Long) With an APITo transcribe hours-long audio, send a link instead of uploading, ask for an async job and collect the transcript by webhook or by polling the job id.
- Speech to textHow to Get SRT or VTT Subtitles From Audio With an APISend audio to a speech-to-text API with response_format set to srt or vtt, or fetch a finished job as subtitles. Here is how both formats work.
- Speech to textHow Batch Speech to Text Works, Step by StepBatch speech to text queues recordings, cuts them into pieces, transcribes them in parallel and returns text and subtitles later. Here is how each step works.
About this guide
Last reviewed . Written by Sydney Kibuuka, Founder, researched and drafted with AI and checked by automated quality checks before it was published. Facts about other companies come from their own published pages, with dates. Read our editorial standards; spotted a mistake? Tell us and we’ll fix it (see corrections).