webhooks:write scope to manage subscriptions, and webhooks:read to list them.
Subscribing
Create a webhook subscription withPOST /webhooks:
Event types
Signature verification
Every delivery includes an HMAC-SHA256 signature so you can verify the request came from VMArea. Headers sent with each delivery:
Verification example:
Always use
crypto.timingSafeEqual (or equivalent) to prevent timing attacks.Retry semantics
If your endpoint does not return a2xx response within 15 seconds, VMArea retries the delivery up to 3 attempts total with exponential backoff (initial delay 10 seconds, doubling per attempt).
After 50 consecutive delivery failures across all events, the webhook subscription is automatically disabled. You can re-enable it from the dashboard or via PATCH /webhooks/:id with { "isActive": true }.
Delivery history (status code, success flag, attempt count) is available via GET /webhooks/:id/deliveries.
Best practices
- Respond quickly. Return
2xxbefore doing any heavy processing — offload work to a queue so you don’t hit the 15-second timeout. - Make handlers idempotent. The same event may be delivered more than once (e.g., after a retry). Use
X-VMArea-Delivery-Idto deduplicate. - Always verify the signature. Do not trust the payload without checking the HMAC.
- Use a dedicated endpoint per environment (production, staging) so you can inspect and replay events independently.