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

# Webhooks

> Receive real-time event notifications for asynchronous API operations.

# Webhooks

Some VoiceLab360 API operations are asynchronous — particularly long audio generation, dubbing, and DAW export. Webhooks deliver completion events to your server in real time so you do not need to poll.

## Configuring a webhook

1. In your API Workspace, navigate to **Webhooks**
2. Enter your endpoint URL (must be HTTPS)
3. Select the event types to receive
4. Save — a webhook secret is generated and shown once

## Webhook payload

```json theme={null}
{
  "event": "tts.completed",
  "timestamp": "2026-07-16T10:00:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "job_id": "job_xyz789",
    "status": "completed",
    "output_url": "https://cdn.voicelab360.com/...",
    "credits_used": 1240,
    "duration_ms": 3800
  }
}
```

## Verifying webhook signatures

Every webhook request includes an `X-VL360-Signature` header. Verify it using your webhook secret to confirm the payload originated from VoiceLab360.

```javascript theme={null}
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}
```

## Event types

| Event                      | Description                 |
| -------------------------- | --------------------------- |
| `tts.completed`            | Text-to-speech job finished |
| `stt.completed`            | Transcription job finished  |
| `dubbing.completed`        | Dubbing job finished        |
| `music.completed`          | Music generation finished   |
| `daw.completed`            | DAW export ready            |
| `studio.booking.confirmed` | Studio booking confirmed    |
| `licensing.completed`      | License agreement finalized |

## Retries

VoiceLab360 retries failed webhook deliveries up to 5 times with exponential backoff over 24 hours. After 5 failures the event is marked undelivered and logged in your Webhooks dashboard.
