Skip to main content
POST
/
monetization
/
ads
/
v1
/
video_ads
cURL
curl --request POST \
  --url https://api.mottostreaming.com/monetization/ads/v1/video_ads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "project_id": "<string>",
  "name": "<string>",
  "ad_manifest": {
    "title": "<string>",
    "video_files": [
      {
        "quality": "VIDEO_QUALITY_UNSPECIFIED",
        "config": {
          "asset_id": "<string>"
        }
      }
    ],
    "aspect_ratio": "<string>",
    "duration_seconds": 123,
    "allow_skip_after_seconds": 123,
    "clickthrough_url": "<string>",
    "impression_tracking_url": "<string>",
    "error_tracking_url": "<string>"
  },
  "ad_tag_url": "<string>",
  "visibility": "VISIBILITY_UNSPECIFIED",
  "geo_applicability_exempt": {
    "country_codes": [
      "<string>"
    ]
  },
  "geo_applicability_apply": {
    "country_codes": [
      "<string>"
    ]
  },
  "applies_to_all": true,
  "target": {
    "entity_ids": [
      "<string>"
    ],
    "event_ids": [
      "<string>"
    ],
    "creative_work_ids": [
      "<string>"
    ],
    "content_start_time": "2023-11-07T05:31:56Z",
    "content_end_time": "2023-11-07T05:31:56Z"
  },
  "priority": "<string>"
}'
{
  "video_ad": {
    "id": "<string>",
    "project_id": "<string>",
    "name": "<string>",
    "ad_manifest": {
      "title": "<string>",
      "video_files": [
        {
          "quality": "VIDEO_QUALITY_UNSPECIFIED",
          "config": {
            "asset_id": "<string>"
          }
        }
      ],
      "aspect_ratio": "<string>",
      "duration_seconds": 123,
      "allow_skip_after_seconds": 123,
      "clickthrough_url": "<string>",
      "impression_tracking_url": "<string>",
      "error_tracking_url": "<string>"
    },
    "ad_tag_url": "<string>",
    "visibility": "VISIBILITY_UNSPECIFIED",
    "geo_applicability_exempt": {
      "country_codes": [
        "<string>"
      ]
    },
    "geo_applicability_apply": {
      "country_codes": [
        "<string>"
      ]
    },
    "applies_to_all": true,
    "target": {
      "entity_ids": [
        "<string>"
      ],
      "event_ids": [
        "<string>"
      ],
      "creative_work_ids": [
        "<string>"
      ],
      "content_start_time": "2023-11-07T05:31:56Z",
      "content_end_time": "2023-11-07T05:31:56Z"
    },
    "priority": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
project_id
string
required

The ID of the project that the ad belongs to.

name
string
required

Name of the video ad

ad_manifest
object

The necessary parameters to generate a manifest (for a VAST or VMAP) to be used for this video ad. Complete VAST video ad manifest configuration

ad_tag_url
string

A third-party hosted ad tag URL to be used for this video ad. This is typically a VAST or VMAP tag in Google Ad Manager or similar.

visibility
enum<string>

Visibility settings for the video ad. When not set to published, the ad will not be shown to end users.

Available options:
VISIBILITY_UNSPECIFIED,
VISIBILITY_PUBLISHED,
VISIBILITY_UNLISTED,
VISIBILITY_HIDDEN
geo_applicability_exempt
object

Viewers from these countries will not have this video ad shown. A list of country codes

geo_applicability_apply
object

Viewers from these countries will have this video ad shown. A list of country codes

applies_to_all
boolean

This video ad applies to all videos in the project.

target
object

This video ad applies to a specific set of videos, as defined by the target.

priority
string

The priority of the ad. If multiple ads apply to a video, the ad with the highest priority will be used.

Response

OK

video_ad
object