v14

latestOpenAPI 3.0.0raw.githubusercontent.com2026-05-279719892.3 MB
Advanced

Create a quartile event

Create an event representing a user reaching quarterly milestones in a piece of media they're viewing.

post/media-bridge/2026-03/events/media-played-percent

Request body

_hsencstring
contactIdinteger
contactUtkstring
externalIdstring
externalPlayContext'EMAIL' | 'EXTERNAL_PAGE'
mediaBridgeIdinteger
mediaNamestring
mediaType'AUDIO' | 'DOCUMENT' | 'IMAGE' | 'OTHER' | 'VIDEO' required
mediaUrlstring
occurredTimestampinteger required
pageIdinteger
pageNamestring
pageUrlstring
playedPercentinteger required
sessionIdstring required

Response

successful operation

contactIdinteger required

The ID of the contact in HubSpot’s system that consumed the media. This can be fetched using HubSpot's Get contact by usertoken (utk) API. The API also supports supplying a usertoken, and will handle converting this into a contact ID automatically.

externalPlayContext'EMAIL' | 'EXTERNAL_PAGE'
mediaBridgeIdinteger required
mediaBridgeObjectCoordinatesstring required
mediaBridgeObjectTypeIdstring required
mediaNamestring required
mediaType'AUDIO' | 'DOCUMENT' | 'IMAGE' | 'OTHER' | 'VIDEO' required
mediaUrlstring
occurredTimestampinteger required
pageIdinteger

The content ID of the page that an event happened on, for HubSpot pages. Required if the page is a HubSpot page.

pageNamestring

The name or title of the page that an event happened on. Required for non-HubSpot pages.

pageObjectCoordinatesstring
pageUrlstring

The URL of the page that an event happened on. Required for non-HubSpot pages.

playedPercentinteger required
portalIdinteger required

The ID of the HubSpot account.

providerIdinteger required
sessionIdstring required