CloudEvents & Webhooks: The CNCF Standard
CloudEvents is a CNCF specification for describing event data in a common way. It solves the biggest headache in webhook integrations: every provider uses a different payload format.
Why CloudEvents Matters
Without a standard, every webhook provider invents its own envelope. Stripe puts the event type in type, GitHub in X-GitHub-Event, Shopify in X-Shopify-Topic. CloudEvents unifies this with required attributes: specversion, type, source, and id.
HTTP Binding: Binary vs Structured Mode
CloudEvents defines two ways to send events over HTTP:
Binary Mode
Attributes in HTTP headers, data in body. Best for existing endpoints.
1.0
com.example.order.created
/orders
evt-abc-123
application/json
{"order_id": "12345", "amount": 99.99}
Structured Mode
Everything in one JSON body. Simpler to log and forward.
application/cloudevents+json
{
"specversion": "1.0",
"type": "com.example.order.created",
"source": "/orders",
"id": "evt-abc-123",
"data": {
"order_id": "12345",
"amount": 99.99
}
}
Receiving CloudEvents with Webhook
Webhook automatically detects CloudEvents by the Ce-Specversion header (binary mode) or specversion field (structured mode). No configuration needed — just point your CloudEvents source at your ingress URL.
curl -X POST https://webhook.sdnbros.app/a/YOUR_TOKEN \
-H "Ce-Specversion: 1.0" \
-H "Ce-Type: com.example.user.signup" \
-H "Ce-Source: /auth" \
-H "Ce-Id: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"user_id": "u_123", "email": "dev@example.com"}'
Webhook extracts and displays:
- Event Type from
ce-type or type
- Event ID from
ce-id or id (used for dedup detection)
- Source from
ce-source or source
- Subject from
ce-subject or subject
Who Uses CloudEvents?
CloudEvents adoption is growing across the industry:
- Azure Event Grid — Microsoft's event routing service uses CloudEvents natively
- Knative Eventing — Kubernetes-native eventing with CloudEvents
- Google Eventarc — Cloud events routing for GCP
- SAP — Enterprise event mesh using CloudEvents
- Oracle Cloud — OCI Events use CloudEvents format
Try It Free →