Advanced

Create

Create a media played event in the HubSpot account. This endpoint is used to log when media content has been played, which can be useful for tracking user engagement with media resources.

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

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/media-bridge/2026-09/events/media-played
  • 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

An encoding parameter used internally by HubSpot.

contactIdinteger

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

contactUtkstring

The unique tracking key for the contact, used for tracking purposes.

externalIdstring

An external identifier for the media, used to correlate with external systems.

externalPlayContext'EMAIL' | 'EXTERNAL_PAGE'

Additional context about the media play event, provided by external systems.

iframeUrlstring

The URL of the iframe containing the media, if applicable.

mediaBridgeIdinteger

A 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, such as 'VIDEO', 'AUDIO', 'DOCUMENT', 'OTHER', or 'IMAGE'.

mediaUrlstring

The URL of the media that was played.

occurredTimestampinteger required

The timestamp when the media play event occurred, in Unix time format.

pageIdinteger

A 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.

sessionIdstring required

A unique identifier for the session during which the media was played.

state'STARTED' | 'VIEWED' required

The state of the media play event, indicating the current status.

Response

successful operation

contactIdinteger required

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

externalPlayContext'EMAIL' | 'EXTERNAL_PAGE'

Additional context provided by external systems about the play event.

iframeUrlstring

The URL of the iframe where the media was embedded and played.

mediaBridgeIdinteger required

The unique identifier for the media bridge instance associated with this event.

mediaBridgeObjectCoordinatesstring required

Coordinates that specify the location or context of the media bridge object.

mediaBridgeObjectTypeIdstring required

The type identifier of the media bridge object involved in the event.

mediaNamestring required

The name of the media content that was played.

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

The type of media that was played, such as video or audio.

mediaUrlstring

The URL where the media content is hosted.

occurredTimestampinteger required

A Unix timestamp in milliseconds indicating 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.

pageObjectCoordinatesstring

Coordinates that specify the location or context of the page object.

pageUrlstring

The URL of the page where the media was played.

portalIdinteger required

The unique identifier of the HubSpot portal where the event occurred.

providerIdinteger required

The unique identifier for the media provider.

sessionIdstring required

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

state'STARTED' | 'VIEWED' required

The state of the media play event, such as 'started' or 'completed'.

Changes

No operation changes recorded.