POST /userprofiles/{userprofilesId}/ads
Inserts a new ad.
Request
- Base URLhttps://dfareporting.googleapis.com/dfareporting/v5
- AuthOAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/dfatraffickingAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/dfatrafficking
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Request body
Account ID of this ad. This is a read-only field that can be left blank.
Whether this ad is active. When true, archived must be false.
Advertiser ID of this ad. This is a required field on insertion.
Whether this ad is archived. When true, active must be false.
Audience segment ID that is being targeted for this ad. Applicable when type is AD_SERVING_STANDARD_AD.
Campaign ID of this ad. This is a required field on insertion.
Comments for this ad.
Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to either rendering on desktop or on mobile devices or in mobile apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are only used for existing default ads. New mobile placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and default ads created for those placements will be limited to those compatibility types. IN_STREAM_VIDEO refers to rendering in-stream video ads developed with the VAST standard.
Whether this ad is a dynamic click tracker. Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is read-only after insert.
ID of this ad. This is a read-only, auto-generated field.
Identifies what kind of resource this is. Value: the fixed string "dfareporting#ad".
Name of this ad. This is a required field and must be less than 256 characters long.
Whether this ad is ssl compliant. This is a read-only field that is auto-generated when the ad is inserted or updated.
Whether this ad requires ssl. This is a read-only field that is auto-generated when the ad is inserted or updated.
Subaccount ID of this ad. This is a read-only field that can be left blank.
Targeting template ID, used to apply preconfigured targeting information to this ad. This cannot be set while any of dayPartTargeting, geoTargeting, keyValueTargetingExpression, languageTargeting, remarketingListExpression, or technologyTargeting are set. Applicable when type is AD_SERVING_STANDARD_AD.
Type of ad. This is a required field on insertion. Note that default ads ( AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource).
Response
Successful response
Account ID of this ad. This is a read-only field that can be left blank.
Whether this ad is active. When true, archived must be false.
Advertiser ID of this ad. This is a required field on insertion.
Whether this ad is archived. When true, active must be false.
Audience segment ID that is being targeted for this ad. Applicable when type is AD_SERVING_STANDARD_AD.
Campaign ID of this ad. This is a required field on insertion.
Comments for this ad.
Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to either rendering on desktop or on mobile devices or in mobile apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are only used for existing default ads. New mobile placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and default ads created for those placements will be limited to those compatibility types. IN_STREAM_VIDEO refers to rendering in-stream video ads developed with the VAST standard.
Whether this ad is a dynamic click tracker. Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is read-only after insert.
ID of this ad. This is a read-only, auto-generated field.
Identifies what kind of resource this is. Value: the fixed string "dfareporting#ad".
Name of this ad. This is a required field and must be less than 256 characters long.
Whether this ad is ssl compliant. This is a read-only field that is auto-generated when the ad is inserted or updated.
Whether this ad requires ssl. This is a read-only field that is auto-generated when the ad is inserted or updated.
Subaccount ID of this ad. This is a read-only field that can be left blank.
Targeting template ID, used to apply preconfigured targeting information to this ad. This cannot be set while any of dayPartTargeting, geoTargeting, keyValueTargetingExpression, languageTargeting, remarketingListExpression, or technologyTargeting are set. Applicable when type is AD_SERVING_STANDARD_AD.
Type of ad. This is a required field on insertion. Note that default ads ( AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource).
Changes
No recorded changes to this operation across all 5 revisions of this API.