Advanced

Record Media Played Percentage

This endpoint allows you to record the percentage of media that has been played. It is useful for tracking user engagement with media content, such as videos or audio files, by capturing the extent to which the media has been consumed. This data can be used for analytics and improving content delivery strategies.

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

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/media-bridge/2026-09/events/media-played-percent
  • Auth
    OAuth 2
    Authorization code: https://app.hubspot.com/oauth/authorize
    Token URL: https://api.hubapi.com/oauth/v1/token scopes: media_bridge.write

Request body

_hsencstring

HubSpot encoding parameter for tracking purposes.

contactIdinteger

The unique identifier for the contact associated with the media play event.

contactUtkstring

The user token key associated with the contact.

externalIdstring

An external identifier for the media, provided by the user.

externalPlayContext'EMAIL' | 'EXTERNAL_PAGE'

Additional context provided externally about the media play event.

mediaBridgeIdinteger

The unique identifier for the media bridge instance.

mediaNamestring

The name of the media that was played.

mediaType'AUDIO' | 'DOCUMENT' | 'IMAGE' | 'OTHER' | 'VIDEO' required

The type of media that was played. Valid values include 'VIDEO', 'AUDIO', 'DOCUMENT', 'OTHER', and 'IMAGE'.

mediaUrlstring

The URL where the media is hosted.

occurredTimestampinteger required

The timestamp when the media play event occurred.

pageIdinteger

The unique identifier for the page where the media was played.

pageNamestring

The name of the page where the media was played.

pageUrlstring

The URL of the page where the media was played.

playedPercentinteger required

The percentage of the media that has been played.

sessionIdstring required

The unique identifier for the session in which the media was played.

Response

successful operation

contactIdinteger required

The unique identifier for the contact associated with the media event. It is a string value.

externalPlayContext'EMAIL' | 'EXTERNAL_PAGE'

Contextual information about the external environment where the media is played. It is a string value.

mediaBridgeIdinteger required

The unique identifier for the media bridge instance. It is a string value.

mediaBridgeObjectCoordinatesstring required

Coordinates that specify the location of the media bridge object. It is a string value.

mediaBridgeObjectTypeIdstring required

The type identifier for the media bridge object. It is a string value.

mediaNamestring required

The name of the media content being played. It is a string value.

mediaType'AUDIO' | 'DOCUMENT' | 'IMAGE' | 'OTHER' | 'VIDEO' required

The type of media being played, such as 'VIDEO', 'AUDIO', etc. It is a string value.

mediaUrlstring

The URL of the media content being played. It is a string value.

occurredTimestampinteger required

The timestamp when the media play event occurred. It is a string value in ISO 8601 format.

pageIdinteger

The unique identifier for the page where the media is being played. It is a string value.

pageNamestring

The name of the page where the media is being played. It is a string value.

pageObjectCoordinatesstring

Coordinates that specify the location of the page object. It is a string value.

pageUrlstring

The URL of the page where the media is being played. It is a string value.

playedPercentinteger required

The percentage of the media content that has been played. It is a number value.

portalIdinteger required

The unique identifier for the HubSpot portal. It is an integer value.

providerIdinteger required

The unique identifier for the media provider. It is a string value.

sessionIdstring required

The unique identifier for the session during which the media was played. It is a string value.

Changes

No operation changes recorded.