# API documentation for Event Data?

**URL:** <https://community.hubspot.com/t/api-documentation-for-event-data/82505>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [June 1, 2023, 9:22pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505 "2023-06-01T21:22:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ECupaioli](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@ECupaioli](https://community.hubspot.com/u/ECupaioli)\
**Post date:** [June 1, 2023, 9:22pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/1 "2023-06-01T21:22:13Z")

</div>

I recently read [this guide](https://speedworksocial.com/hubspot-meetings-conversion-tracking/) on how to add an event listener for when someone books a meeting, but I saw it was from 4 years ago so I went to check if the event.data objects were accurate but couldn’t find any docs on event.data. I was able to log the object coming through but can someone point me in the right direction for when I need to do something else with the event.data?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 2, 2023, 8:54pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/2 "2023-06-02T20:54:22Z")

</div>

Hey, @ECupaioli 👋 Welcome to the community. I agree with you, using older resources can be help, but they run the risk of becoming obsolete or outdated.

The specifics of what is included in `event.data` can vary depending on the specific API or platform you’re using. Without more information on the specific endpoint you’re using, it’s hard to provide guidance. Would you mind sharing more details about what you are using? That might help us to provide more targeted advice.

Probably not a solution, but you might consider messing around with JavaScript’s `console.dir(event)`. It allows you to interactively explore all properties of the `event` object in your browser’s console.

Have fun building! — Jaycee

---

<div class="post-metadata">

**Author:** ![EdCupaioli](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edcupaioli/32/103251_2.png) [@EdCupaioli](https://community.hubspot.com/u/EdCupaioli)\
**Post date:** [June 2, 2023, 9:14pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/3 "2023-06-02T21:14:31Z")

</div>

I’m using the [Meeting Scheduler widget](https://knowledge.hubspot.com/meetings-tool/embed-the-meeting-widget-on-a-page) . There’s an ad landing page and an API page for how to build your own, but nothing really on the widget and how to use event listeners with it. [This is the code](https://gist.github.com/ablatner88/81f156a48d57b4a8b5c611f446c4f0df#file-clickfunnels-hubspot-meeting-booked-event-listener) from the guide that works for me but I’m not clear on how that person got that info. It’s the [wisdom of the ancients](https://xkcd.com/979/) without any proper docs.

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [June 5, 2023, 9:20am UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/4 "2023-06-05T09:20:36Z")

</div>

Hi @ECupaioli ,

Here is the code I use to send data from the meeting tool to Tagmanager:

```lia-code-sample
<script type="text/javascript">
 window.dataLayer = window.dataLayer || [];
 window.addEventListener('message', event => {
 if (event.data.meetingBookSucceeded) {
 window.dataLayer.push({
 event: 'hubspotBookedMeeting',
 currentUrl: window.location.href,
 hsFormGuid: event.data.meetingsPayload.formGuid,
 paidMeeting: event.data.meetingsPayload.isPaidMeeting,
 linkType: event.data.meetingsPayload.linkType,
 offline: event.data.meetingsPayload.offline,
 });
 }
 });
</script>

```

Hope this helps!  
I created a [video](https://youtu.be/s3Ie-tKn0hM) about HubSpot events and GA4, but it also explains a bit about the meeting tool (around 4 min).

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 6, 2023, 5:56pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/5 "2023-06-06T17:56:22Z")

</div>

Thank you, @Teun! You’re a legend 🙌 And thank you to @EdCupaioli for the Wisdom of the Ancients reference. I needed a good lol/sob – Jaycee

---

<div class="post-metadata">

**Author:** ![EdCupaioli](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edcupaioli/32/103251_2.png) [@EdCupaioli](https://community.hubspot.com/u/EdCupaioli)\
**Post date:** [June 6, 2023, 6:11pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/6 "2023-06-06T18:11:45Z")

</div>

I posted the article I got a very similar solution from. I’m sure your solution works fine too, however my question was regarding the API documentation you used to find that solution. I can’t find any docs on the event.data response. How would you have known listen for that response? I’m assuming you read some docs from hubspot or the lords of hubspot appeared in a burning bush to reveal their secrets. I’m hoping the former is true so I can create solutions in the future much like you did since I don’t learn anything from just copy pasting solutions.

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [June 6, 2023, 6:16pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/7 "2023-06-06T18:16:33Z")

</div>

Hi @EdCupaioli ,

Fair point, and mate, do you make me laugh!  
Sadly, there isn’t any documentation about window events besides the form events. I simply went with testing and using console logs to see what I can use.  
As you can see, there is no result in Google available;

> **[Google Search](https://www.google.com/search?q=site%3Adevelopers.hubspot.com+%22meetingBookSucceeded%22)**

> **[Google Search](https://www.google.com/search?q=site%3Aknowledge.hubspot.com+%22meetingBookSucceeded%22)**

---

<div class="post-metadata">

**Author:** ![EdCupaioli](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edcupaioli/32/103251_2.png) [@EdCupaioli](https://community.hubspot.com/u/EdCupaioli)\
**Post date:** [June 6, 2023, 6:22pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/8 "2023-06-06T18:22:39Z")

</div>

I did console logs to test it out so that tracks. I guess I know now hubspot adds [messages](https://developer.mozilla.org/en-US/docs/Web/API/Window/message_event) on successful API calls. Trust me, I googled a plenty but also turned up nothing. I found [API docs](https://developers.hubspot.com/docs/api/crm/meetings) on Meetings but no response output like I would expect from API documentation.

---

<div class="post-metadata">

**Author:** ![EdCupaioli](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edcupaioli/32/103251_2.png) [@EdCupaioli](https://community.hubspot.com/u/EdCupaioli)\
**Post date:** [September 25, 2024, 9:14pm UTC](https://community.hubspot.com/t/api-documentation-for-event-data/82505/9 "2024-09-25T21:14:12Z")

</div>

I also found this solution using the logs specific to CTA forms since they post a different message: [https://community.hubspot.com/t5/CMS-Development/hsFormCallback-for-hubspot-form-embedded-in-Pop-up-CTA/td-p/767234](https://community.hubspot.com/t5/CMS-Development/hsFormCallback-for-hubspot-form-embedded-in-Pop-up-CTA/td-p/767234)
