How it works
- Configure a webhook endpoint in your dashboard
- Screenshotly sends a POST request to your URL when events occur
- Your server processes the event and responds with a
2xxstatus code
Event types
| Event | Description |
|---|---|
screenshot.created | A screenshot capture has been initiated |
screenshot.completed | A screenshot has been successfully captured |
screenshot.failed | A screenshot capture has failed |
screenshot.deleted | A screenshot has been deleted |
Webhook payload
When an event occurs, Screenshotly sends a POST request with a JSON body:screenshot.failed events, an error field is included:
Webhook headers
Each webhook delivery includes these headers:| Header | Description |
|---|---|
Content-Type | application/json |
User-Agent | Screenshotly-Webhooks/1.0 |
X-Webhook-Signature | HMAC-SHA256 signature for verification |
X-Webhook-Event | The event type (e.g., screenshot.completed) |
X-Webhook-ID | Your webhook configuration ID |
X-Webhook-Timestamp | ISO 8601 timestamp of the event |
Signature verification
Every webhook delivery is signed using your webhook’s secret key with HMAC-SHA256. Verify the signature to ensure the request is from Screenshotly:Handling webhooks
Here’s a complete Express.js handler with signature verification:Retry behavior
If your webhook endpoint returns a non-2xx status code or times out (10 second limit), Screenshotly retries delivery with exponential backoff. You can configure retry policies in the dashboard:- Max retries: 0–10 attempts (default: 3)
- Retry delay: 100–60,000ms (default: 1,000ms)
- Backoff multiplier: 1–5x (default: 2x)
Best practices
- Verify signatures — always validate the
X-Webhook-Signatureheader to ensure requests are from Screenshotly - Respond quickly — return a
200response immediately, then process the payload asynchronously - Handle duplicates — use the
event_idfield for deduplication, as the same event may be delivered more than once - Use HTTPS — always use an HTTPS endpoint for your webhook URL
- Monitor delivery logs — check your webhook’s delivery history in the dashboard to debug failures

