curl --request POST \
--url https://api.hubapi.com/media-bridge/v1/events/media-played-percent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaType": "AUDIO",
"occurredTimestamp": 123,
"playedPercent": 123,
"sessionId": "<string>",
"_hsenc": "<string>",
"contactId": 123,
"contactUtk": "<string>",
"externalId": "<string>",
"externalPlayContext": "EMAIL",
"mediaBridgeId": 123,
"mediaName": "<string>",
"mediaUrl": "<string>",
"pageId": 123,
"pageName": "<string>",
"pageUrl": "<string>"
}
'{
"contactId": 123,
"mediaBridgeId": 123,
"mediaBridgeObjectCoordinates": "<string>",
"mediaBridgeObjectTypeId": "<string>",
"mediaName": "<string>",
"mediaType": "AUDIO",
"occurredTimestamp": 123,
"playedPercent": 123,
"portalId": 123,
"providerId": 123,
"sessionId": "<string>",
"externalPlayContext": "EMAIL",
"mediaUrl": "<string>",
"pageId": 123,
"pageName": "<string>",
"pageObjectCoordinates": "<string>",
"pageUrl": "<string>"
}curl --request POST \
--url https://api.hubapi.com/media-bridge/v1/events/media-played-percent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaType": "AUDIO",
"occurredTimestamp": 123,
"playedPercent": 123,
"sessionId": "<string>",
"_hsenc": "<string>",
"contactId": 123,
"contactUtk": "<string>",
"externalId": "<string>",
"externalPlayContext": "EMAIL",
"mediaBridgeId": 123,
"mediaName": "<string>",
"mediaUrl": "<string>",
"pageId": 123,
"pageName": "<string>",
"pageUrl": "<string>"
}
'{
"contactId": 123,
"mediaBridgeId": 123,
"mediaBridgeObjectCoordinates": "<string>",
"mediaBridgeObjectTypeId": "<string>",
"mediaName": "<string>",
"mediaType": "AUDIO",
"occurredTimestamp": 123,
"playedPercent": 123,
"portalId": 123,
"providerId": 123,
"sessionId": "<string>",
"externalPlayContext": "EMAIL",
"mediaUrl": "<string>",
"pageId": 123,
"pageName": "<string>",
"pageObjectCoordinates": "<string>",
"pageUrl": "<string>"
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO EMAIL, EXTERNAL_PAGE successful operation
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.
AUDIO, DOCUMENT, IMAGE, OTHER, VIDEO The ID of the HubSpot account.
EMAIL, EXTERNAL_PAGE The content ID of the page that an event happened on, for HubSpot pages. Required if the page is a HubSpot page.
The name or title of the page that an event happened on. Required for non-HubSpot pages.
The URL of the page that an event happened on. Required for non-HubSpot pages.
Was this page helpful?