Webhooks
Get signed HTTP callbacks when uploads finish, assets are deleted, imports complete or usage limits approach.
Events
| Type | When |
|---|---|
asset.uploaded |
An asset was created, or a new version uploaded |
asset.processed |
Eager transformations for an upload finished (status: succeeded, partial, failed) |
asset.deleted / asset.restored / asset.purged |
Trash, restore, permanent deletion |
import.finished |
Every item of a bulk import or migration reached a final state |
usage.alert_triggered |
A usage alert reached its threshold |
quota.state_changed |
Your organization moved between normal, warning, restricted and suspended |
team.changed |
A member was invited, joined, changed role, was removed or left |
Subscribe to * to receive every event, including ones added later.
{
"id": "evt_01k6z1b7r3m0x9q2t5v8w4y6n1",
"type": "asset.uploaded",
"created_at": "2026-10-06T18:24:53+00:00",
"project": "shop",
"data": { "asset": { "id": "01J9…", "public_id": "hero", "version": 1, "url": "…" }, "created": true }
}
Add an endpoint
In Developers → Webhooks, or with the API (webhooks:manage). The
response contains the endpoint's signing secret — the only time the API
returns it.
curl https://pixviro.com/v1/webhooks -H "Authorization: Bearer $PIXVIRO_API_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://example.com/webhooks/pixviro","events":["asset.uploaded","import.finished"]}'
Endpoints must be public https:// URLs. Send test delivers a
webhook.test event.
Verify deliveries
Each request has a PixViro-Signature: t=<unix>,v1=<hex> header, where
v1 = HMAC-SHA256(secret, "<t>.<raw body>"). Check it against the raw
body, reject timestamps older than 5 minutes (replay protection), and dedupe
on PixViro-Event-Id (deliveries are at-least-once):
import { constructEvent } from '@pixviro/sdk';
app.post('/webhooks/pixviro', express.raw({ type: 'application/json' }), async (req, res) => {
const event = await constructEvent(req.body, req.get('PixViro-Signature'), process.env.PIXVIRO_WEBHOOK_SECRET);
res.sendStatus(204);
});
$event = PixViro\Webhook::constructEvent(
$request->getContent(),
$request->header('PixViro-Signature'),
config('pixviro.webhook_secret'),
);
event = construct_event(request.get_data(), request.headers.get("PixViro-Signature"), os.environ["PIXVIRO_WEBHOOK_SECRET"])
During a secret rotation (Roll secret), requests carry two v1
signatures for 24 hours: accept either.
Retries
Answer 2xx within 10 seconds and do slow work later. Anything else —
error codes, timeouts, redirects — is retried after 1 min, 5 min, 30 min,
2 h, 6 h, 12 h and then daily, for about 4 days. An endpoint that keeps
failing for 3 days is disabled and your team is emailed; re-enable it once
fixed and redeliver missed events from its delivery log.

