▪ Free plan: 3 websites with daily snapshots, no card required → ▪ ▪ Free plan: 3 websites, no card →

Webhook events

Webhooks let you receive real-time notifications when events happen in your account — a snapshot completes, a monitor changes, or a visual diff is generated. Instead of polling the API, register a URL and we'll send a POST request to it whenever a subscribed event occurs.

Each webhook delivery is signed with HMAC-SHA256, includes automatic retries on failure, and comes with a delivery log so you can debug integration issues. You can register up to 5 webhook endpoints per account.

List webhook endpoints

Returns all your registered webhook endpoints with their subscribed events, active status, and delivery count.

GET/v1/webhooks
bash
curl "https://api.snapshotarchive.com/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

200 OK
{
  "data": [
    {
      "id": 1,
      "url": "https://example.com/webhook",
      "events": ["snapshot.completed", "snapshot.failed"],
      "description": "Notify on captures",
      "is_active": true,
      "last_triggered_at": "2026-10-01T12:00:00Z",
      "deliveries_count": 47,
      "created_at": "2026-09-15T10:00:00Z"
    }
  ]
}

Create a webhook endpoint

Registers a new URL to receive event notifications. The response includes a secret key used to verify webhook signatures — store it securely, it's only shown once. If you don't specify which events to subscribe to, the endpoint receives all events.

POST/v1/webhooks

Request body

FieldTypeRequiredDescription
urlstringYesHTTPS endpoint URL (max 2048 chars)
eventsarrayNoEvent types to subscribe to (see below)
descriptionstringNoDescription (max 255 chars)

Available event types

EventDescription
snapshot.completedA snapshot was captured successfully
snapshot.failedA snapshot capture failed
monitor.createdA new monitor was created
monitor.updatedA monitor's settings were changed
monitor.deletedA monitor was deleted
monitor.pausedA monitor was paused
monitor.resumedA monitor was resumed
diff.completedA visual diff was generated
bash
curl -X POST https://api.snapshotarchive.com/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "url": "https://example.com/webhook",
    "events": ["snapshot.completed", "snapshot.failed", "diff.completed"],
    "description": "Capture notifications"
  }'

Response

201 Created
{
  "data": {
    "endpoint": {
      "id": 1,
      "url": "https://example.com/webhook",
      "events": ["snapshot.completed", "snapshot.failed", "diff.completed"],
      "is_active": true
    },
    "secret": "a1b2c3d4e5f6..."
  }
}
Save the secret immediately. The secret is only returned when the endpoint is created. Use it to verify the X-Webhook-Signature header on incoming deliveries (HMAC-SHA256 of the payload body).

Update and delete a webhook

PUT /v1/webhooks/{id}

Update the URL, subscribed events, description, or active status.

bash
# Pause a webhook
curl -X PUT https://api.snapshotarchive.com/v1/webhooks/1 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"is_active": false}'
DELETE /v1/webhooks/{id}

Delete a webhook endpoint. Returns 204 No Content.

bash
curl -X DELETE https://api.snapshotarchive.com/v1/webhooks/1 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Rotate webhook secret

Generates a new signing secret for a webhook endpoint. The old secret stops working immediately, so update your receiver before rotating. This is useful if you suspect the secret has been compromised.

POST/v1/webhooks/{id}/rotate-secret
bash
curl -X POST https://api.snapshotarchive.com/v1/webhooks/1/rotate-secret \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

# Response: {"data": {"secret": "new-secret-here..."}}

Test webhook and view deliveries

Send a test ping to verify your endpoint is reachable and processing payloads correctly. You can also view the delivery history to debug failed deliveries and see response codes.

POST /v1/webhooks/{id}/test

Sends a test payload to the endpoint. Returns the HTTP status code and response body from your server.

bash
curl -X POST https://api.snapshotarchive.com/v1/webhooks/1/test \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

# Response: {"data": {"message": "Test webhook delivered successfully.", "status": 200}}
GET /v1/webhooks/{id}/deliveries

List delivery history with status codes, response bodies, and retry information.

Query parameters

ParameterTypeDescription
event_typestringFilter by event type
deliveredbooleantrue for successful, false for failed/pending
per_pageintegerItems per page (default: 20)
bash
# View failed deliveries
curl "https://api.snapshotarchive.com/v1/webhooks/1/deliveries?delivered=false" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Webhook payload structure

Every webhook delivery sends a JSON POST request with this structure:

Payload
{
  "event": "snapshot.completed",
  "timestamp": "2026-10-01T12:00:00Z",
  "data": {
    "snapshot_id": "9e8f7a6b-...",
    "monitor_id": 42,
    "url": "https://example.com",
    "status": "completed"
  }
}

Verify the X-Webhook-Signature header by computing HMAC-SHA256 of the raw request body using your endpoint's secret key.