Skip to main content
Webhooks are the recommended way to receive results. Register one or more HTTPS endpoints; Selektable POSTs a signed event when a generation reaches a terminal state.

Events

Subscribe to specific events by name or use ["*"] to receive all.

Register an endpoint

Returns 201 including the signing secret — shown once, store it securely:
Manage endpoints with the webhook endpoint routes.

Event payload

data is the same shape as the Generation object.

Verifying signatures

Selektable signs every webhook using the Standard Webhooks scheme. Each request includes: The signature is computed as:
where secret is the base64-decoded portion of your whsec_ key (everything after the whsec_ prefix).

Node.js example

Always verify against the raw request body before parsing JSON. Re-serializing parsed JSON changes whitespace and breaks signature verification.

Delivery & retries

  • Endpoints should return a 2xx status quickly (within ~10 seconds).
  • Non-2xx responses are retried with exponential backoff (up to 5 attempts).
  • Make your handler idempotent by deduplicating on event.id — under retry, the same event may arrive more than once.

Polling alternative

If you can’t accept webhooks, poll GET /v1/generations/{id} until status is complete or failed. Recommended cadence: every 1–2 seconds, with a sensible overall timeout (most renders finish within ~30s). Webhooks and polling can be used together.