Skip to main content
Webhooks let Platendoc push events to your server the moment a generation completes or fails — no polling required.

Setup

  1. Open app.platendoc.com and navigate to Webhooks in the sidebar.
  2. Click Add webhook.
  3. Enter your HTTPS endpoint URL and select the events you want to receive.
  4. Copy the signing secret — it’s shown only once. Store it in an environment variable (e.g. PLATENDOC_WEBHOOK_SECRET).

Events

Delivery format

Platendoc sends a POST request to your endpoint with the following headers:

Payload

For generation.failed events, payload also includes an error field:
After receiving the event, call GET /generations/{generationId} to fetch the full generation object including outputUrl.

Verifying signatures

Every delivery includes an X-Platendoc-Signature header. Always verify it before processing.
Always use a timing-safe comparison (e.g. timingSafeEqual, hmac.compare_digest). Standard string equality (===, ==) is vulnerable to timing attacks.

Retries

After 5 failed attempts the delivery is dropped. Return a 2xx status code quickly — perform any heavy processing asynchronously.
Respond with 200 OK immediately, then enqueue the event for processing. This prevents timeouts from causing unnecessary retries.