> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vmeg.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Configure async task callbacks

export const productUrls = JSON.parse('{"home":"https://www.vmeg.ai/home","apiConfiguration":"https://www.vmeg.ai/open-api-setting","signIn":"https://www.vmeg.ai/signIn?redirect=%2Fhome","signInToApiSettings":"https://www.vmeg.ai/signIn?redirect=%2Fopen-api-setting","signUp":"https://www.vmeg.ai/signup","account":"https://www.vmeg.ai/account","helpCenter":"https://www.vmeg.ai/help-center/","pricing":"https://www.vmeg.ai/pricing","myTasks":"https://www.vmeg.ai/my-tasks","myAssets":"https://www.vmeg.ai/my-assets","videoTranslation":"https://www.vmeg.ai/translation","audioTranslation":"https://www.vmeg.ai/audio-translation","cloneVoice":"https://www.vmeg.ai/clone-voice","bookDemo":"https://www.vmeg.ai/book-a-demo/","contactUs":"https://www.vmeg.ai/contact-us/","apiDocs":"https://docs.vmeg.ai"}');

export const apiKeyUrl = "https://www.vmeg.ai/open-api-setting";

## What webhooks are

When an **async** task finishes (TTS, text translation, voice clone, or media translation), VMEG sends an **HTTP POST** to a URL you configure. This is how you receive **task results** — the `create-async` HTTP response only confirms acceptance (`taskId`, etc.).

Webhooks are the **delivery mechanism** for async outcomes, not a separate product.

## Why you need them

| Without webhook                              | With webhook                                   |
| -------------------------------------------- | ---------------------------------------------- |
| You only get `taskId` from `create-async`    | You receive full deliverables in the POST body |
| You must poll `GET /openapi/v1/tasks/detail` | Your server is notified when work completes    |

For production async integrations, configure a webhook before calling `*-create-async` endpoints.

## Configuration

On <a href={apiKeyUrl}>API Configuration</a> on vmeg.ai (<a href={productUrls.signInToApiSettings}>sign in</a> if needed):

1. Set your **Webhook URL** (HTTPS recommended).
2. After you save the URL, VMEG **generates a Webhook Secret** and displays it on the same page. Copy it for [signature verification](/guides/webhook-verification) — you do not set the secret yourself.

Test connectivity from the same page when available.

## Receiver requirements

Your endpoint must:

1. **Return 2xx quickly** (within a few seconds). Offload heavy work to a queue or background worker.
2. **Verify signatures** on the raw request body — see [Webhook verification](/guides/webhook-verification).
3. **Deduplicate** by **`pipelineKey`** in the JSON body. Retries for the same async completion reuse the same `pipelineKey` — see [Webhook request body](/guides/webhook-request#deduplicate-by-pipelinekey). Return 2xx without repeating side effects if you already processed that key.

If you return a non-2xx status or time out, VMEG retries with backoff.

## Webhook payload

When a task finishes, the POST JSON includes an **`event`** field (for example `openapi-tts`) so you know which product completed. See the event table and envelope in [Webhook request body](/guides/webhook-request).

Per-product field definitions are under **Callbacks** on each `create-async` page in [API reference](/api-reference/introduction).

## Related

* [Idempotency](/guides/idempotency) — required on all mutating POST requests (including `create-async`)
* [Products overview](/guides/products/overview) — sync vs async by product
