Skip to main content
POST
Create Event

Supported products

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
mediaType
enum<string>
required

The type of media involved in the event. Valid values include 'VIDEO', 'AUDIO', 'DOCUMENT', 'OTHER', and 'IMAGE'.

Available options:
AUDIO,
DOCUMENT,
IMAGE,
OTHER,
VIDEO
occurredTimestamp
integer<int64>
required

The timestamp when the event occurred, represented as a Unix timestamp in milliseconds.

rawDataMap
object
required

A map of raw data key-value pairs providing additional context about the event.

sessionId
string
required

The unique identifier for the session during which the event occurred.

_hsenc
string

An encoded string used for HubSpot-specific encoding purposes.

contactId
integer<int64>

The unique identifier for the contact associated with the event.

contactUtk
string

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

derivedValues
object
externalId
string

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

externalPlayContext
enum<string>

Additional context about the play event, typically used for external integrations.

Available options:
EMAIL,
EXTERNAL_PAGE
mediaBridgeId
integer<int64>

The unique identifier for the media bridge instance.

mediaName
string

The name of the media involved in the event.

mediaUrl
string

The URL of the media involved in the event.

pageId
integer<int64>

The unique identifier for the page where the event occurred.

pageName
string

The name of the page where the event occurred.

pageUrl
string

The URL of the page where the event occurred.

rawDataString
string

A raw data string containing additional information about the event.

Response

successful operation

contactId
integer<int64>
required

A string representing the unique identifier for the contact associated with the event.

mediaBridgeId
integer<int64>
required

A string representing the unique identifier for the media bridge instance.

mediaBridgeObjectCoordinates
string
required

A string detailing the coordinates of the media bridge object.

mediaBridgeObjectTypeId
string
required

A string representing the type identifier for the media bridge object.

mediaName
string
required

A string representing the name of the media content.

mediaType
enum<string>
required

A string indicating the type of media involved in the event, such as 'VIDEO', 'AUDIO', etc.

Available options:
AUDIO,
DOCUMENT,
IMAGE,
OTHER,
VIDEO
occurredTimestamp
integer<int64>
required

A string representing the timestamp of when the event occurred, in ISO 8601 format.

percentRange
string
required

A string indicating the range of percentages that were played during the session.

portalId
integer<int32>
required

An integer representing the unique identifier for the HubSpot portal.

providerId
integer<int32>
required

A string representing the unique identifier for the media provider.

sessionId
string
required

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

totalPercentPlayed
number
required

A number indicating the total percentage of the media that was played.

externalPlayContext
enum<string>

A string providing additional context about the play event from an external source.

Available options:
EMAIL,
EXTERNAL_PAGE
mediaUrl
string

A string containing the URL of the media content.

pageId
integer<int64>

A string representing the unique identifier for the page.

pageName
string

A string representing the name of the page where the media was accessed.

pageObjectCoordinates
string

A string detailing the coordinates of the page object.

pageUrl
string

A string containing the URL of the page where the media was accessed.

rawData
string

A string containing raw data associated with the event.

totalSecondsPlayed
integer<int32>

A number representing the total seconds of media that were played.

Last modified on September 9, 2026