Skip to main content

Webhooks

Receive real-time notifications when events occur.

Available Events

EventTrigger
content.createdNew content created
content.updatedContent updated
content.publishedContent published
content.deletedContent deleted
media.uploadedFile uploaded
media.deletedFile deleted
user.registeredNew user registered
order.createdNew order (e-commerce)
order.updatedOrder status changed

Creating Webhooks

Via GraphQL

mutation CreateWebhook {
createWebhook(input: {
url: "https://your-server.com/webhook"
events: ["content.published", "media.uploaded"]
secret: "your-secret-key"
}) {
id
url
events
active
}
}

Via Admin UI

  1. Go to Settings → Webhooks
  2. Click Add Webhook
  3. Enter URL and select events
  4. Save

Payload Format

{
"event": "content.published",
"timestamp": "2025-01-01T12:00:00Z",
"webhook_id": "webhook-uuid",
"data": {
"entry_id": "entry-uuid",
"content_type": "page",
"title": "New Page",
"slug": "new-page"
}
}

Signature Verification

Verify webhook authenticity:

import hmac
import hashlib

def verify_signature(payload: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)

Best Practices

  1. Verify signatures — Always validate authenticity
  2. Respond quickly — Return 200 within 5 seconds
  3. Handle retries — Implement idempotency
  4. Log events — Keep records for debugging