Webhooks
Webhooks Overview
Understanding and using Konstantly webhooks
Webhooks allow you to receive real-time notifications about events happening in your Konstantly platform. Each webhook event contains detailed information about what happened and the relevant resources.
Event Types
Course Events
Triggered when a course is published
Triggered when a course is unpublished
Triggered when a course is assigned to a user
Triggered when a user starts a course
Triggered when a user makes progress in a course
Triggered when a user completes a course
User Events
Triggered when a new user is created
Triggered when user information is updated
Group Events
Triggered when a user is added to a group
Common Properties
All webhook events share these common properties:
Timestamp when the event occurred
Event type identifier
Event-specific payload data
Best Practices
- Webhook Handling:
- Implement proper error handling
- Use retry logic for failed deliveries
- Process webhooks asynchronously
- Validate webhook signatures
- Respond quickly (2xx status)
- Security:
- Use HTTPS endpoints
- Validate event data
- Keep endpoint URLs secret
- Monitor for unusual patterns
- Implementation Tips:
- Store raw webhook data
- Process events idempotently
- Set reasonable timeouts
- Log webhook failures
Testing Webhooks
- Event History:
- Use GET /webhook/:event/last to fetch recent events
- Test handling with real event data
- Verify payload processing
- Development:
- Set up test environment endpoints
- Use event simulator when available
- Test all event types
- Verify error handling