We're releasing some new features for marketing events. These new features include the ability to create contacts from the events, as well as tracking registration and detailed attendance for the events.
As part of these updates, we're making changes to theMarketing Events APIto support these new features.
What's new?
3 new endpoints are being released:
POST /marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/create Changes the state of a specified attendee. The state can be:register,attendorcancel. If the state isattend, you can optionally includejoinedAtandleftAtvalues to record how long they attended the event.
POST /marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/email-create Works like the previous endpoint, but can use an email address instead of a contact record ID to create a new contact in HubSpot.
POST /marketing/v3/marketing-events/events/{externalEventId}/complete This endpoint is used after the event is finished, and all attendance updates have been made. Calling this endpoint triggers the calculation of the attendance duration for all attendees, which updates the timeline entries for the attendees.
What's being removed?
With the release of the new endpoints, 2 endpoints are being sunset:
POST /marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert This is replaced by the new/createendpoint
POST /marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/email-upsert This is being replaced by the new/email-create endpoint
What's changing?
Aside from the new URLs, the main difference between the old endpoints and the new ones is the support of the optionaljoinedAtandleftAtfields. Otherwise the data will be the same as you used with the old endpoints.
Additionally, you will need to make a request to the new/completeendpoint to make sure that the attendance duration is displayed in the timeline of the related contact records in HubSpot.
When is this happening?
The new endpoints and functionality are available today, and can be used immediately. Please see theMarketing Events API documentationfor details on using the new endpoints.
The 2 sunset endpoints will be removed onApril 30th, 2023.
Please let us know if you have any questions by replying below.
I'm currently trying to use the /marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/email-create endpoint and getting the following response:
"status": "error",
"message": "externalAccountId is required",
I can see it's not marked as a required parameter in the documentation. I've since added the parameter to my request body like so: