Skip to main content

Single Webinar Created

This event is triggered when a single (one-time) webinar is created or updated. It provides comprehensive information about the webinar, including session timing and participant details.

Event Type

webinar.created.single

Trigger for the following events:

  • When a new one-time webinar is being created
  • When an existing one-time webinar details are updated
  • When a new 1-1 consultation is booked by user

Setting Up the Webhook

To subscribe to this webhook event, configure your webhook endpoint with the following:

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.created.single",
"webinar": "<webinar to be associated> (optional sends all webinar related events if not specified)"
}'

Parameters

ParameterTypeRequiredDescription
hookUrlstringYesYour webhook endpoint URL
eventstringYesMust be `webinar.created.single`
webinarstringNoSpecific webinar ID to monitor. If not specified, receives events for all webinars

Webhook Payload

When any of the mentioned event is being triggered, TagMango will send a POST request to your webhook URL with the following payload:

Example

{
"name": "John Doe",
"email": "john@example.com",
"phone": 1234567890,
"timezone": "+05:30",
"callList": [
{
"webinar": "Introduction to Digital Marketing",
"webinarId": "634fc35ddaf58580e2418c40",
"webinarLink": "https://meet.google.com/abc-defg-hij",
"webinarFromTime": "2024-03-15T10:00:00.000Z",
"webinarToTime": "2024-03-15T11:00:00.000Z",
"webinarFromTimeInCreatorTimezone": "2024-03-15T15:30:00.000Z",
"webinarToTimeInCreatorTimezone": "2024-03-15T16:30:00.000Z",
"creatorTimezone": "+05:30"
}
],
"mangoes": "mango1, mango2, mango3"
}

Schema

name
string
The attendee's full name
email
string
The attendee's email address
phone
number
The attendee's phone number
timezone
string | null
The attendee's timezone in UTC offset format (e.g. +05:30)
callList
array
List of webinar sessions the attendee has registered for, for single webinar it will be a single item, for recurring webinar it will be an array of items
Show 8 properties
mangoes
string
List of mangoes names (products) associated with the webinar, comma separated string
Timezone Handling

The payload includes timestamps in both the attendee's and creator's timezones to help you:

  • Display correct times to different users
  • Handle timezone conversions automatically
Single Session Focus

Unlike recurring webinars, this event specifically handles one-time webinar sessions. The callList array will typically contain a single webinar session entry.

High Volume Webhook Considerations

When a webinar targets a large number of subscribers, TagMango will trigger separate webhook calls for each participant. For example, if 1000 users register for a webinar, you'll receive 1000 individual webhook requests, each containing that specific participant's details.

Important considerations:

  • Ensure your webhook endpoint can handle high request volumes
  • Implement proper rate limiting and queuing mechanisms

Handling the Webhook

Your webhook endpoint should:

  1. Respond with 200 status - Return a 200 HTTP status code to acknowledge receipt
  2. Process quickly - Respond within 30 seconds to avoid timeouts
  3. Implement idempotency - Handle duplicate events gracefully
  4. 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`);
}