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

# Webhooks

> Get a signed request at your own endpoint when exports and generations finish and assets change.

Webhooks send an HTTPS `POST` to your endpoints when something happens in a workspace, such as an
export finishing. You don't have to poll.

Members manage a workspace's endpoints in the [dashboard](https://rendermate.com/dashboard), under
**webhooks**. There you add an endpoint's URL, choose the events it gets, copy its signing secret,
and see every delivery, with its response. You can also resend one, or send a test event. Managing
webhooks needs the `workspace:api-keys:manage` permission.

## Events

| Event | Sent when | What your app should do |
| - | - | - |
| `export.succeeded` | An export finished: its download is ready. | Fetch `download_url` within a day, or read the export again for a fresh one. |
| `export.failed` | An export failed or was cancelled. | Show `error`. Exporting the same version again reuses what was already rendered. |
| `generation.succeeded` | A generation finished: what it made is saved as assets. | Use `outputs`' asset names in documents as `asset://<name>`. |
| `generation.failed` | A generation failed. | Show `error`. |
| `generation.cancelled` | A generation was cancelled. | Check `usage`: a provider that had started may still have charged. |
| `asset.created` | An asset was recorded at a new name, by an upload, a sync or a generation. | Refresh lists of assets. |
| `asset.updated` | An asset's content was replaced. | Read it again if you show or cache its content. |
| `asset.deleted` | An asset was deleted. | Remove it from lists. |
| `asset.moved` | An asset was renamed. | Rename it using `previous_name`. |

## Payload

Every event has the same envelope. `data` is the object as the API returns it: an export as
`GET /v1/exports/{id}` shows it, a generation as `GET /v1/generations/{id}` does, an asset
as `GET /v1/assets/{name}` does (without its `download_url`).

```json theme={null}
{
  "id": "evt_6ZK3P0Q8RS4T1VWX2Y5A7B9C0D",
  "type": "export.succeeded",
  "created_at": "2026-12-03T10:00:00.000000Z",
  "workspace_id": "ws_use_01a2…",
  "data": {
    "id": "exp_01M8WN3V93EMHV7TV75ABVTKEA",
    "document_id": "doc_…",
    "version": 3,
    "status": "succeeded",
    "file_name": "doc_…-v3.mp4",
    "download_url": "https://api.rendermate.com/download/…",
    "error": null,
    "usage": { "segments": 20, "rendered": 4, "reused": 16, "minutes_rendered": 0.4 },
    "created_at": "2026-12-03T09:58:12.000000Z",
    "updated_at": "2026-12-03T10:00:00.000000Z"
  }
}
```

An `asset.moved` event's `data` also has `previous_name`. An export's `download_url` expires after
about a day. If you handle an event later than that, read the export again for a fresh one.

## Verify the signature

Each request is signed with the endpoint's signing secret (`whsec_…`), following
[Standard Webhooks](https://www.standardwebhooks.com). Check the signature before you trust the
body:

* `webhook-id`: the event's delivery ID. It's the same on every retry of that event.
* `webhook-timestamp`: when the request was sent, in seconds since the Unix epoch.
* `webhook-signature`: `v1,` followed by the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`.
  The key is the base64-decoded part of the secret after `whsec_`. The header can list several
  signatures, separated by spaces; accept the request if any of them matches.

Compute the signature over the raw body, before parsing it. Reject requests whose timestamp is more
than a few minutes off. The Standard Webhooks libraries do all of this:

```javascript theme={null}
import { Webhook } from "standardwebhooks";

const webhook = new Webhook(process.env.RENDERMATE_WEBHOOK_SECRET);
// Throws unless the signature and timestamp are valid.
const event = webhook.verify(rawBody, {
  "webhook-id": request.headers["webhook-id"],
  "webhook-timestamp": request.headers["webhook-timestamp"],
  "webhook-signature": request.headers["webhook-signature"],
});
```

## Deliveries and retries

Answer with any `2xx` status within 15 seconds. Do the work after you answer. If you answer with
anything else, or don't answer in time, the event is retried on a schedule over about a day:
after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, then 10 hours twice. An endpoint that
keeps failing for days is disabled.

Delivery is at least once, so the same event can arrive twice. Use `webhook-id`, or the envelope's
`id`, to skip an event you've already handled. Events can arrive out of order. Use `data`'s
`updated_at`, or read the object again, when the order matters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.