HubSpot: Media bridge schemas
7 HubSpot schemas with complete fields and constraints.
← Media bridge operations · All schemas
Create Event — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
_hsenc | string | Optional | An encoded string used for HubSpot-specific encoding purposes. |
contactId | integer | Optional | The unique identifier for the contact associated with the event. Format: int64 |
contactUtk | string | Optional | The unique tracking key for the contact, used for tracking purposes. |
derivedValues | Model | Optional | Expand Create Event — request body — body derived Values |
externalId | string | Optional | An external identifier for the event, typically used to correlate with external systems. |
externalPlayContext | string | Optional | Additional context about the play event, typically used for external integrations. One of: EMAIL, EXTERNAL_PAGE |
mediaBridgeId | integer | Optional | The unique identifier for the media bridge instance. Format: int64 |
mediaName | string | Optional | The name of the media involved in the event. |
mediaType | string | Required within parent | The type of media involved in the event. Valid values include 'VIDEO', 'AUDIO', 'DOCUMENT', 'OTHER', and 'IMAGE'. One of: AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO |
mediaUrl | string | Optional | The URL of the media involved in the event. |
occurredTimestamp | integer | Required within parent | The timestamp when the event occurred, represented as a Unix timestamp in milliseconds. Format: int64 |
pageId | integer | Optional | The unique identifier for the page where the event occurred. Format: int64 |
pageName | string | Optional | The name of the page where the event occurred. |
pageUrl | string | Optional | The URL of the page where the event occurred. |
rawDataMap | object | Required within parent | A map of raw data key-value pairs providing additional context about the event. Additional keys: see wildcard field |
rawDataMap.* | integer | Additional keys | Format: int32 |
rawDataString | string | Optional | A raw data string containing additional information about the event. |
sessionId | string | Required within parent | The unique identifier for the session during which the event occurred. |
Referenced models: Create Event — request body — body derived Values
Create Event — request body — body derived Values
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
totalPercentPlayed | number | Required within parent | The percentage of the media content that was played. This is a numerical value indicating how much of the total content was viewed, expressed as a percentage. |
totalSecondsPlayed | integer | Required within parent | The total duration in seconds that the media content was played. This is a numerical value representing the cumulative playtime. Format: int32 |
Create Event — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactId | JSON | Required within parent | |
contactId (anyOf 1) | integer | Alternative | A string representing the unique identifier for the contact associated with the event. Format: int64 |
contactId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
externalPlayContext | string | Optional | A string providing additional context about the play event from an external source. Known values: EMAIL, EXTERNAL_PAGE |
mediaBridgeId | JSON | Required within parent | |
mediaBridgeId (anyOf 1) | integer | Alternative | A string representing the unique identifier for the media bridge instance. Format: int64 |
mediaBridgeId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
mediaBridgeObjectCoordinates | string | Required within parent | A string detailing the coordinates of the media bridge object. |
mediaBridgeObjectTypeId | string | Required within parent | A string representing the type identifier for the media bridge object. |
mediaName | string | Required within parent | A string representing the name of the media content. |
mediaType | string | Required within parent | A string indicating the type of media involved in the event, such as 'VIDEO', 'AUDIO', etc. Known values: AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO |
mediaUrl | string | Optional | A string containing the URL of the media content. |
occurredTimestamp | JSON | Required within parent | |
occurredTimestamp (anyOf 1) | integer | Alternative | A string representing the timestamp of when the event occurred, in ISO 8601 format. Format: int64 |
occurredTimestamp (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pageId | JSON | Optional | |
pageId (anyOf 1) | integer | Alternative | A string representing the unique identifier for the page. Format: int64 |
pageId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pageName | string | Optional | A string representing the name of the page where the media was accessed. |
pageObjectCoordinates | string | Optional | A string detailing the coordinates of the page object. |
pageUrl | string | Optional | A string containing the URL of the page where the media was accessed. |
percentRange | string | Required within parent | A string indicating the range of percentages that were played during the session. |
portalId | JSON | Required within parent | |
portalId (anyOf 1) | integer | Alternative | An integer representing the unique identifier for the HubSpot portal. Format: int32 |
portalId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
providerId | JSON | Required within parent | |
providerId (anyOf 1) | integer | Alternative | A string representing the unique identifier for the media provider. Format: int32 |
providerId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
rawData | string | Optional | A string containing raw data associated with the event. |
sessionId | string | Required within parent | A string representing the unique identifier for the session during which the media was played. |
totalPercentPlayed | JSON | Required within parent | |
totalPercentPlayed (anyOf 1) | number | Alternative | A number indicating the total percentage of the media that was played. |
totalPercentPlayed (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
totalSecondsPlayed | JSON | Optional | |
totalSecondsPlayed (anyOf 1) | integer | Alternative | A number representing the total seconds of media that were played. Format: int32 |
totalSecondsPlayed (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Create — media Bridge media Played — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
_hsenc | string | Optional | An encoding parameter used internally by HubSpot. |
contactId | integer | Optional | The unique identifier for the contact associated with the media play event. Format: int64 |
contactUtk | string | Optional | The unique tracking key for the contact, used for tracking purposes. |
externalId | string | Optional | An external identifier for the media, used to correlate with external systems. |
externalPlayContext | string | Optional | Additional context about the media play event, provided by external systems. One of: EMAIL, EXTERNAL_PAGE |
iframeUrl | string | Optional | The URL of the iframe containing the media, if applicable. |
mediaBridgeId | integer | Optional | A unique identifier for the media bridge instance. Format: int64 |
mediaName | string | Optional | The name of the media that was played. |
mediaType | string | Required within parent | The type of media that was played, such as 'VIDEO', 'AUDIO', 'DOCUMENT', 'OTHER', or 'IMAGE'. One of: AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO |
mediaUrl | string | Optional | The URL of the media that was played. |
occurredTimestamp | integer | Required within parent | The timestamp when the media play event occurred, in Unix time format. Format: int64 |
pageId | integer | Optional | A unique identifier for the page where the media was played. Format: int64 |
pageName | string | Optional | The name of the page where the media was played. |
pageUrl | string | Optional | The URL of the page where the media was played. |
sessionId | string | Required within parent | A unique identifier for the session during which the media was played. |
state | string | Required within parent | The state of the media play event, indicating the current status. One of: STARTED, VIEWED |
Create — media Bridge media Played — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactId | JSON | Required within parent | |
contactId (anyOf 1) | integer | Alternative | The unique identifier for the contact associated with this media event. Format: int64 |
contactId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
externalPlayContext | string | Optional | Additional context provided by external systems about the play event. Known values: EMAIL, EXTERNAL_PAGE |
iframeUrl | string | Optional | The URL of the iframe where the media was embedded and played. |
mediaBridgeId | JSON | Required within parent | |
mediaBridgeId (anyOf 1) | integer | Alternative | The unique identifier for the media bridge instance associated with this event. Format: int64 |
mediaBridgeId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
mediaBridgeObjectCoordinates | string | Required within parent | Coordinates that specify the location or context of the media bridge object. |
mediaBridgeObjectTypeId | string | Required within parent | The type identifier of the media bridge object involved in the event. |
mediaName | string | Required within parent | The name of the media content that was played. |
mediaType | string | Required within parent | The type of media that was played, such as video or audio. Known values: AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO |
mediaUrl | string | Optional | The URL where the media content is hosted. |
occurredTimestamp | JSON | Required within parent | |
occurredTimestamp (anyOf 1) | integer | Alternative | A Unix timestamp in milliseconds indicating when the media play event occurred. Format: int64 |
occurredTimestamp (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pageId | JSON | Optional | |
pageId (anyOf 1) | integer | Alternative | The unique identifier for the page where the media was played. Format: int64 |
pageId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pageName | string | Optional | The name of the page where the media was played. |
pageObjectCoordinates | string | Optional | Coordinates that specify the location or context of the page object. |
pageUrl | string | Optional | The URL of the page where the media was played. |
portalId | JSON | Required within parent | |
portalId (anyOf 1) | integer | Alternative | The unique identifier of the HubSpot portal where the event occurred. Format: int32 |
portalId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
providerId | JSON | Required within parent | |
providerId (anyOf 1) | integer | Alternative | The unique identifier for the media provider. Format: int32 |
providerId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
sessionId | string | Required within parent | The unique identifier for the session during which the media was played. |
state | string | Required within parent | The state of the media play event, such as 'started' or 'completed'. Known values: STARTED, VIEWED |
Record Media Played Percentage — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
_hsenc | string | Optional | HubSpot encoding parameter for tracking purposes. |
contactId | integer | Optional | The unique identifier for the contact associated with the media play event. Format: int64 |
contactUtk | string | Optional | The user token key associated with the contact. |
externalId | string | Optional | An external identifier for the media, provided by the user. |
externalPlayContext | string | Optional | Additional context provided externally about the media play event. One of: EMAIL, EXTERNAL_PAGE |
mediaBridgeId | integer | Optional | The unique identifier for the media bridge instance. Format: int64 |
mediaName | string | Optional | The name of the media that was played. |
mediaType | string | Required within parent | The type of media that was played. Valid values include 'VIDEO', 'AUDIO', 'DOCUMENT', 'OTHER', and 'IMAGE'. One of: AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO |
mediaUrl | string | Optional | The URL where the media is hosted. |
occurredTimestamp | integer | Required within parent | The timestamp when the media play event occurred. Format: int64 |
pageId | integer | Optional | The unique identifier for the page where the media was played. Format: int64 |
pageName | string | Optional | The name of the page where the media was played. |
pageUrl | string | Optional | The URL of the page where the media was played. |
playedPercent | integer | Required within parent | The percentage of the media that has been played. Format: int32 |
sessionId | string | Required within parent | The unique identifier for the session in which the media was played. |
Record Media Played Percentage — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactId | JSON | Required within parent | |
contactId (anyOf 1) | integer | Alternative | The unique identifier for the contact associated with the media event. It is a string value. Format: int64 |
contactId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
externalPlayContext | string | Optional | Contextual information about the external environment where the media is played. It is a string value. Known values: EMAIL, EXTERNAL_PAGE |
mediaBridgeId | JSON | Required within parent | |
mediaBridgeId (anyOf 1) | integer | Alternative | The unique identifier for the media bridge instance. It is a string value. Format: int64 |
mediaBridgeId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
mediaBridgeObjectCoordinates | string | Required within parent | Coordinates that specify the location of the media bridge object. It is a string value. |
mediaBridgeObjectTypeId | string | Required within parent | The type identifier for the media bridge object. It is a string value. |
mediaName | string | Required within parent | The name of the media content being played. It is a string value. |
mediaType | string | Required within parent | The type of media being played, such as 'VIDEO', 'AUDIO', etc. It is a string value. Known values: AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO |
mediaUrl | string | Optional | The URL of the media content being played. It is a string value. |
occurredTimestamp | JSON | Required within parent | |
occurredTimestamp (anyOf 1) | integer | Alternative | The timestamp when the media play event occurred. It is a string value in ISO 8601 format. Format: int64 |
occurredTimestamp (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pageId | JSON | Optional | |
pageId (anyOf 1) | integer | Alternative | The unique identifier for the page where the media is being played. It is a string value. Format: int64 |
pageId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pageName | string | Optional | The name of the page where the media is being played. It is a string value. |
pageObjectCoordinates | string | Optional | Coordinates that specify the location of the page object. It is a string value. |
pageUrl | string | Optional | The URL of the page where the media is being played. It is a string value. |
playedPercent | JSON | Required within parent | |
playedPercent (anyOf 1) | integer | Alternative | The percentage of the media content that has been played. It is a number value. Format: int32 |
playedPercent (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
portalId | JSON | Required within parent | |
portalId (anyOf 1) | integer | Alternative | The unique identifier for the HubSpot portal. It is an integer value. Format: int32 |
portalId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
providerId | JSON | Required within parent | |
providerId (anyOf 1) | integer | Alternative | The unique identifier for the media provider. It is a string value. Format: int32 |
providerId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
sessionId | string | Required within parent | The unique identifier for the session during which the media was played. It is a string value. |