API

Webhooks.

Signed job events for async pipelines. The delivery queue is the next infrastructure slice; the event contract is below.

Events

NAMETYPEDESCRIPTION
job.succeededeventOutput is ready.
job.failedeventJob failed; credits released.
job.canceledeventJob canceled.
credits.loweventBalance below 20%.
credits.depletedeventBalance is zero.

Payload

Event
{
  "id": "evt_01J...",
  "type": "job.succeeded",
  "created_at": "2026-12-06T10:00:03Z",
  "livemode": true,
  "data": {
    "object": {
      "id": "job_01J...",
      "status": "succeeded",
      "output": { "url": "https://.../signed", "format": "png" },
      "credits_charged": 1
    }
  }
}

Signature

Each delivery includes an HMAC-SHA256 signature over the timestamp and raw body. Verify it before parsing JSON.

HTTP header
Erasa-Signature: t=1765010403,v1=<hex_hmac_sha256>
Verify
const expected = hmacSha256(secret, `${timestamp}.${rawBody}`);
if (!timingSafeEqual(expected, signature)) throw new Error("invalid signature");

Retries

Deliveries retry with exponential backoff for up to 24 hours. Endpoints that fail for seven days are disabled and the workspace owner is emailed.

Webhook delivery is scaffolded but not enabled in the current deployment. Use polling until the delivery queue ships.