Skip to main content

Delivery model

Mynth supports:
  • dashboard-managed webhooks
  • task-level custom webhook endpoints
Dashboard-managed webhooks are signed. Task-level custom endpoints are not signed.

Headers

Signed deliveries include:

Events

Payloads sent by the worker are image-task payloads:
  • task.image.generate.completed
  • task.image.generate.failed
  • task.image.rate.completed
  • task.image.rate.failed
  • task.image.alt.completed
  • task.image.alt.failed
Dashboard event subscriptions also support hierarchical matching through:
  • task.completed
  • task.failed
  • all
For example, a task.image.generate.completed delivery can satisfy a webhook subscribed to task.completed.

Signature verification

The signature is calculated from:
using the webhook secret and HMAC-SHA256. The X-Mynth-Signature header format is:
Parse the timestamp and signature from the header, then recompute the HMAC over {timestamp}.{raw_request_body} using your webhook secret. Compare the result to the v1 value. See Use Webhooks for a complete code example.

task.image.generate.completed payload

task.image.generate.failed payload

Failed tasks do not include a result object because generation did not produce images. Failure detail is in errors instead.

task.image.rate.completed payload

task.image.rate.failed payload

task.image.alt.completed payload

task.image.alt.failed payload

errors on failed deliveries

Every *.failed delivery includes an errors array. The array is always non-empty. Each entry is: This is the same errors array returned by GET /tasks/:id for failed tasks. See Task error codes for the full code list.