Webinar Completion
This event is triggered when a webinar session has been completed. It provides participant and webinar details for post-webinar.
Event Type
webinar.completed.all
Trigger for the following events:
- 15 minutes after webinar end time for all participants who attended
Setting Up the Webhook
To subscribe to this webhook event, configure your webhook endpoint with the following:
- cURL
- JavaScript
- Python
curl -X 'POST' \
'https://api-prod-new.tagmango.com/api/v1/integration/webhook/webhook' \
-H 'accept: application/json' \
-H 'x-api-key: <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
"hookUrl": "<your webhook url>",
"event": "webinar.completed.all",
"webinar": "<webinar to be associated> (optional sends all webinar related events if not specified)"
}'
fetch('https://api-prod-new.tagmango.com/api/v1/integration/webhook/webhook', {
method: 'POST',
headers: {
'accept': 'application/json',
'Content-Type': 'application/json',
'x-api-key': '<Your API Key>'
},
body: JSON.stringify({
"hookUrl": "<your webhook url>",
"event": "webinar.completed.all",
"webinar": "<webinar to be associated> (optional sends all webinar related events if not specified)"
})
})
.then(response => response.json())
.then(data => console.log(data));
import requests
import json
url = "https://api-prod-new.tagmango.com/api/v1/integration/webhook/webhook"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"x-api-key": "<Your API Key>"
}
data = {
"hookUrl": "<your webhook url>",
"event": "webinar.completed.all",
"webinar": "<webinar to be associated> (optional sends all webinar related events if not specified)"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
hookUrl | string | Yes | Your webhook endpoint URL |
event | string | Yes | Must be `webinar.completed.all` |
webinar | string | No | Specific webinar ID to monitor. If not specified, receives events for all webinars |
Webhook Payload
When a webinar is completed, TagMango will send a POST request to your webhook URL with the following payload for each participant:
Example
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"webinar": "Introduction to Digital Marketing",
"webinarId": "6149b1e5612c4e5fd96041d3",
"webinarLink": "https://example.com/webinar/recording/123"
}
Schema
name
string
Name of the webinar participant
email
string
Email address of the webinar participant
phone
string
Phone number of the webinar participant
webinar
string
Title/name of the completed webinar
webinarId
string
Unique identifier of the completed webinar
webinarLink
string
Link to the webinar recording or replay
High Volume Completion Considerations
For webinars with many attendees, completion webhooks can generate significant traffic as individual calls are made for each participant who attended.
Important considerations:
- Each participant who attended receives a separate webhook call
- A webinar with 1000 attendees generates 1000 completion webhook calls
Handling the Webhook
Your webhook endpoint should:
- Respond with 200 status - Return a 200 HTTP status code to acknowledge receipt
- Process quickly - Respond within 30 seconds to avoid timeouts
- Implement idempotency - Handle duplicate events gracefully
- Verify authenticity - Validate the request using the provided authentication headers
Example Implementation
// Node.js Express example
app.post("/webhook", (req, res) => {
const payload = req.body;
// Verify the webhook authenticity (implement based on your security setup)
if (!verifyWebhook(req)) {
return res.status(401).send("Unauthorized");
}
// Process the webhook event
try {
console.log("Event data:", JSON.stringify(payload, null, 2));
// Your business logic here
// Process the event data according to your application needs
processWebhookEvent(eventType, payload);
} catch (error) {
console.error("Error processing webhook:", error);
// You might want to return 500 here depending on your retry policy
}
// Acknowledge receipt
res.status(200).send("OK");
});
function processWebhookEvent(eventType, payload) {
// Implement your custom logic based on the event type and payload
// This is where you'll handle the webhook data according to your business requirements
// Examples of what you might do:
// - Store event data in your database
// - Send notifications to users
// - Update user records
// - Trigger automated workflows
// - Sync data with external systems
console.log(`Processing ${eventType} event for your application`);
}