Media Data Object - Campaign Management

Defines the base object of media.

Do not try to instantiate a Media. You can create the following object that derives from it.


<xs:complexType name="Media" xmlns:xs="">
    <xs:element minOccurs="0" name="Id" nillable="true" type="xs:long" />
    <xs:element minOccurs="0" name="MediaType" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="Type" nillable="true" type="xs:string" />


Element Description Data Type
Id The unique Microsoft Advertising identifier of the media.

Add: Read-only
MediaType The type of media to add to the media library.

For media that will be used with an ImageAdExtension, the supported values are Image16x9, Image15x10, Image4x3, and Image12x10.

For media that will be used with a ResponsiveAd, the supported values are Image1x1, Image191x100, and Image4x1.

For more information about supported aspect ratios, see the Image Data Object Remarks.

Add: Required
Type The media type. For more information about media types, see Remarks below.

Add: Read-only


For Java and the .NET languages, do not set the Type element because the value is determined when you instantiate an image.

If you generate the SOAP manually, use the type attribute of the <Media> node as shown in the following example, to specify that the media is an image.


Images and icons are both created as Image objects.

<Media xmlns:i="">
  <Media i:type="Image">
    <Id i:nil="true" />
  <Media i:type="Image">
    <Id i:nil="true" />


Service: CampaignManagementService.svc v12

Used By