Skip to main content

Webhook Integration

Webhooks let you build real-time integrations that respond to Pictify events. Instead of polling for changes, receive instant notifications when renders complete, fail, or bindings update.

Use Cases

  • Update database when images are ready
  • Trigger workflows after batch completion
  • Send notifications on render failures
  • Sync with CDN when content changes
  • Log analytics for monitoring

Quick Start

1. Create Endpoint

Build a webhook receiver: Pictify signs every delivery; verify the signature with a small HMAC helper (the SDKs do not ship a webhook helper — roll your own as shown in Webhook Verification).

2. Subscribe to Events

Webhook subscriptions are managed in the dashboard (Settings > Webhooks) or via the REST API. The SDKs do not expose webhook methods. Create a subscription with cURL:
The response includes the signing secret (shown only once) — store it for signature verification:

3. Test Your Endpoint

Use the dashboard to send a test webhook:
  1. Go to Settings > Webhooks
  2. Find your subscription
  3. Click Send Test
  4. Verify your endpoint received it

Event Types

render.completed

Fired when an image, GIF, or PDF finishes rendering.
Use cases:
  • Update CMS with image URL
  • Invalidate CDN cache
  • Notify users their image is ready

render.failed

Fired when a render fails.
Use cases:
  • Alert on failures
  • Retry with different parameters
  • Log for debugging

batch.completed

Fired when a batch job finishes.
Use cases:
  • Process batch results
  • Send completion notification
  • Trigger next workflow step

binding.updated

Fired when a binding successfully refreshes.
Use cases:
  • Invalidate cached pages
  • Log data changes
  • Trigger dependent updates

binding.failed

Fired when a binding fails to refresh.

Filtering Events

Subscribe only to events you care about:

Filter by Template

Filter by Type

Handler Patterns

Database Updates

Cache Invalidation

Slack Notifications

Workflow Orchestration

Error Handling

Idempotent Handlers

Webhooks may be delivered multiple times. Make handlers idempotent:

Graceful Degradation

Handle errors without crashing:

Queue Processing

For heavy workloads, queue webhooks:

Security

Always Verify Signatures

Use HTTPS

Always use HTTPS endpoints in production:

Validate Event Data

Debugging

Webhook Logs

View webhook delivery logs in the dashboard:
  1. Go to Settings > Webhooks
  2. Click on a subscription
  3. View Delivery Logs
Each log shows:
  • Timestamp
  • Response status
  • Response body
  • Response time

Test Mode

Send a test webhook without triggering a real event from the dashboard:
  1. Go to Settings > Webhooks
  2. Select your subscription
  3. Click Send Test
  4. Confirm your endpoint received and verified the delivery

Local Development

Use ngrok or similar for local testing: