---
title: "Create"
method: POST
path: "/media-bridge/2026-09/events/media-played"
tags: ["Advanced"]
---

# Create

`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`

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.

## Request body

- MediaPlayedEventRequest
  - `_hsenc` string: An encoding parameter used internally by HubSpot.
  - `contactId` integer: The unique identifier for the contact associated with the media play event.
  - `contactUtk` string: The unique tracking key for the contact, used for tracking purposes.
  - `externalId` string: 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.
  - `iframeUrl` string: The URL of the iframe containing the media, if applicable.
  - `mediaBridgeId` integer: A unique identifier for the media bridge instance.
  - `mediaName` string: 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'.
  - `mediaUrl` string: The URL of the media that was played.
  - `occurredTimestamp` integer, required: The timestamp when the media play event occurred, in Unix time format.
  - `pageId` integer: A unique identifier for the page where the media was played.
  - `pageName` string: The name of the page where the media was played.
  - `pageUrl` string: The URL of the page where the media was played.
  - `sessionId` string, 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 `200`

successful operation

- MediaPlayedEvent
  - `contactId` integer, 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.
  - `iframeUrl` string: The URL of the iframe where the media was embedded and played.
  - `mediaBridgeId` integer, required: The unique identifier for the media bridge instance associated with this event.
  - `mediaBridgeObjectCoordinates` string, required: Coordinates that specify the location or context of the media bridge object.
  - `mediaBridgeObjectTypeId` string, required: The type identifier of the media bridge object involved in the event.
  - `mediaName` string, 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.
  - `mediaUrl` string: The URL where the media content is hosted.
  - `occurredTimestamp` integer, required: A Unix timestamp in milliseconds indicating when the media play event occurred.
  - `pageId` integer: The unique identifier for the page where the media was played.
  - `pageName` string: The name of the page where the media was played.
  - `pageObjectCoordinates` string: Coordinates that specify the location or context of the page object.
  - `pageUrl` string: The URL of the page where the media was played.
  - `portalId` integer, required: The unique identifier of the HubSpot portal where the event occurred.
  - `providerId` integer, required: The unique identifier for the media provider.
  - `sessionId` string, 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'.

## Other responses

- `default`: An error occurred.

---

[API](https://skmtc.dev/hubspot/apis/cms-media-bridge.md) - [All operations](https://skmtc.dev/hubspot/apis/cms-media-bridge/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/cms-media-bridge/revisions/8f11766b98c4?raw)
