Infomaniak Streaming Video icon

Infomaniak Streaming Video

Interact with Infomaniak Streaming Video API

Actions92

Players > Ads → Create An Ads

AI-generated

Summary

Creates a new ad in a specified player channel on Infomaniak Streaming Video.

Inputs

  • authentication — Authentication method: either OAuth2 or API Key.
  • path_channel (required) — The ID of the channel where the ad will be placed.
  • path_player (required) — The ID of the player that will play the ad.
  • query_account_id (required) — The account identifier associated with the ad request.
  • queryParameters — Optional additional query parameters; can include 'query_with' to load related resources.
  • body_offset (required) — The offset within the playlist where the ad should start.
  • body_type (required) — Type of ad to play; either 'pre-roll' or 'mid-roll'.
  • body_url (required) — URL of the VAST XML defining the ad content.
  • bodyParameters — Additional body fields; includes 'body_is_periodic' to indicate if the ad should repeat.
  • returnFullResponse — If true, the full API response is returned; otherwise only success/failure.

Output shape

the created ad record

Returns the newly created ad object including its identifier; may include optional fields based on returnFullResponse.

Examples

Example 1: Add a pre-roll ad at offset 5 in channel 12 of player 3 using OAuth2

authentication: oauth2; path_channel: 12; path_player: 3; body_type: pre-roll; body_offset: 5; body_url: https://example.com/ad.xml; returnFullResponse: true

Example 2: Create a mid-roll ad with periodic looping in channel 7

authentication: apiKey; path_channel: 7; path_player: 0; body_type: mid-roll; body_offset: 0; body_is_periodic: true; body_url: https://example.com/midroll.xml

Example 3: Create an ad with additional query parameters to fetch related resources

authentication: oauth2; path_channel: 5; path_player: 2; queryParameters: { query_with: "metadata" } ; body_url: https://example.com/ads/123.xml

Links

Discussion