Overview
The Webhooks API allows you to receive real-time notifications about events in your EcoEvents account. Configure webhook endpoints to be notified when events are created, updated, attendees register, sustainability goals are achieved, and more.Authentication
All API requests require an API key to be included in the header:Create Webhook
POST /api/webhooks
Register a new webhook endpoint to receive event notifications.
Request
The HTTPS URL where webhook payloads will be sent. Must use HTTPS protocol.
Array of event types to subscribe to. See Event Types for available options.
Optional description for this webhook
Optional secret for webhook signature verification. If not provided, one will be generated.
Whether the webhook is active
Optional metadata as key-value pairs
Response
Unique identifier for the webhook
The webhook endpoint URL
Subscribed event types
Webhook description
Secret for signature verification (shown only once during creation)
Whether the webhook is active
Custom metadata
Timestamp when webhook was created
Timestamp when webhook was last updated
Example
Response Example
List Webhooks
GET /api/webhooks
Retrieve all configured webhooks for your account.
Query Parameters
Filter by active status
Page number for pagination
Number of webhooks per page (max 100)
Response
Array of webhook objects (without secrets)
Pagination information
Example
Delete Webhook
DELETE /api/webhooks/:id
Remove a webhook endpoint. This action cannot be undone.
Path Parameters
The unique identifier of the webhook to delete
Response
Indicates whether the deletion was successful
Confirmation message
The ID of the deleted webhook
Example
Event Types
Available Event Types
Subscribe to the following event types when creating webhooks:Event Events
Triggered when a new event is created
Triggered when an event is updated
Triggered when an event is deleted
Triggered when an event status changes to published
Triggered when an event is cancelled
Triggered when an event is marked as completed
Attendee Events
Triggered when a new attendee registers
Triggered when attendee information is updated
Triggered when an attendee cancels their registration
Triggered when an attendee checks in at the event
Sustainability Events
Triggered when a sustainability goal is achieved
Triggered when a carbon offset contribution is made
Triggered when a sustainability report is generated
Analytics Events
Triggered when an analytics report is ready
Triggered when a configured metric threshold is exceeded
Webhook Payload Structure
All webhook requests include the following structure:Headers
Payload
Event Payload Examples
event.created
attendee.registered
sustainability.goal_achieved
Verifying Webhook Signatures
To ensure webhook requests are genuinely from EcoEvents, verify the signature in theX-EcoEvents-Signature header.
Verification Process
- Extract the signature from the
X-EcoEvents-Signatureheader - Compute HMAC SHA-256 of the raw request body using your webhook secret
- Compare the computed signature with the received signature
Example Implementation
Best Practices
Use HTTPS
Always use HTTPS URLs for webhook endpoints to ensure data security.
Verify Signatures
Always verify webhook signatures to prevent unauthorized requests.
Respond Quickly
Return a 200 status code within 5 seconds to acknowledge receipt.
Process Async
Process webhook payloads asynchronously to avoid timeouts.
Retry Logic
EcoEvents will retry failed webhook deliveries:- Immediate retry on timeout or 5xx error
- 3 additional retries with exponential backoff (1min, 10min, 1hr)
- Webhooks are disabled after 10 consecutive failures
Idempotency
Webhook events may be delivered more than once. Use the uniqueid field to implement idempotency in your webhook handler.
Error Responses
Error details
Common Error Codes
| Status Code | Error Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid request parameters |
| 400 | INVALID_URL | URL must use HTTPS protocol |
| 400 | INVALID_EVENT_TYPE | One or more event types are invalid |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | NOT_FOUND | Webhook not found |
| 409 | DUPLICATE_WEBHOOK | Webhook with this URL already exists |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |