Webhooks
Listen to template events and integrate with your application workflow
Get real-time notifications when users create or update templates in your embed. Perfect for syncing data, sending notifications, or triggering workflows.
Overview
Webhooks send HTTP POST requests to your specified endpoint whenever:
- A user creates a new template (
template.create
) - A user updates an existing template (
template.update
)
Setup
1. Configure Webhook URL
In your embed settings, add your webhook endpoint:
2. Handle Webhook Events
Create an endpoint that accepts POST requests:
Event Types
template.create
Fired when a user creates a new template:
template.update
Fired when a user saves changes to a template:
Implementation Examples
Express.js
PHP
Python (FastAPI)
Common Use Cases
Save to Database
Send Notifications
Sync with External API
Security
Verify Webhook Origin
Always verify webhooks come from Orshot:
Use HTTPS
Always use HTTPS endpoints for webhooks in production:
Validate Payload
Check that required fields are present:
Error Handling
Retry Logic
Handle temporary failures gracefully:
Logging
Log all webhook events for debugging:
Testing
Local Development
Use ngrok to expose your local server:
Test Payloads
Create test webhook payloads for development:
Troubleshooting
Webhook Not Firing
- Check if webhook URL is correctly configured
- Verify the endpoint is accessible from the internet
- Ensure you're returning a 2xx status code
Payload Issues
- Log the raw request body to see what's being sent
- Check Content-Type headers
- Verify JSON parsing is working correctly
Timeout Issues
- Keep webhook processing under 10 seconds
- Use background jobs for heavy processing
- Return success response quickly, process asynchronously