openapi: 3.1.0 info: title: Google Campaign Manager Campaign Manager 360 Ads API description: The Campaign Manager 360 API (formerly DoubleClick Campaign Manager) provides programmatic access to manage digital advertising campaigns, ads, placements, and reports. Use this API to automate trafficking workflows, create and manage campaign structures, configure ad placements across publisher sites, and generate comprehensive reporting data for campaign performance analysis. The API supports the full campaign lifecycle from creation through reporting and optimization. version: v4 contact: name: Google Campaign Manager 360 API Support url: https://support.google.com/campaignmanager termsOfService: https://developers.google.com/terms servers: - url: https://dfareporting.googleapis.com/dfareporting/v4 description: Campaign Manager 360 API Production Server security: - OAuth2: - https://www.googleapis.com/auth/dfareporting - https://www.googleapis.com/auth/dfatrafficking tags: - name: Ads description: Manage ad configurations within campaigns. Ads define the creative content, delivery schedules, targeting rules, and placement assignments that determine how and where advertising is served to users. paths: /userprofiles/{profileId}/ads: get: operationId: listAds summary: Google Campaign Manager List Ads description: Retrieves a list of ads, possibly filtered. Results are returned in descending order by last modified time. Use query parameters to filter by campaign, advertiser, type, or other criteria. tags: - Ads security: - OAuth2: - https://www.googleapis.com/auth/dfatrafficking parameters: - $ref: '#/components/parameters/ProfileId' - name: campaignIds in: query required: false description: Select only ads belonging to these campaigns. schema: type: array items: type: string style: form explode: true - name: advertiserIds in: query required: false description: Select only ads belonging to these advertisers. schema: type: array items: type: string style: form explode: true - name: ids in: query required: false description: Select only ads with these IDs. schema: type: array items: type: string style: form explode: true - name: placementIds in: query required: false description: Select only ads with these placement IDs assigned. schema: type: array items: type: string style: form explode: true - name: type in: query required: false description: Select only ads with the specified type. schema: type: string enum: - AD_SERVING_STANDARD_AD - AD_SERVING_DEFAULT_AD - AD_SERVING_CLICK_TRACKER - AD_SERVING_TRACKING - AD_SERVING_BRAND_SAFE_AD - name: active in: query required: false description: Select only active ads. schema: type: boolean - name: archived in: query required: false description: Select only archived ads. schema: type: boolean default: false - name: searchString in: query required: false description: Search string for filtering results. Matches against ad name and ID fields. schema: type: string - name: sortField in: query required: false schema: type: string enum: - ID - NAME default: ID - name: sortOrder in: query required: false schema: type: string enum: - ASCENDING - DESCENDING default: ASCENDING - $ref: '#/components/parameters/MaxResults' - $ref: '#/components/parameters/PageToken' responses: '200': description: List of ads. content: application/json: schema: $ref: '#/components/schemas/AdsListResponse' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' x-microcks-operation: delay: 0 dispatcher: FALLBACK post: operationId: insertAd summary: Google Campaign Manager Create an Ad description: Inserts a new ad. The ad is created under the specified campaign and advertiser with the provided delivery, creative rotation, and targeting configuration. tags: - Ads parameters: - $ref: '#/components/parameters/ProfileId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Ad' example: name: Homepage Banner Ad campaignId: '12345678' advertiserId: '87654321' type: AD_SERVING_STANDARD_AD active: true startTime: '2026-01-01T00:00:00Z' endTime: '2026-03-31T23:59:59Z' responses: '200': description: Created ad. content: application/json: schema: $ref: '#/components/schemas/Ad' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' x-microcks-operation: delay: 0 dispatcher: FALLBACK /userprofiles/{profileId}/ads/{adId}: get: operationId: getAd summary: Google Campaign Manager Get an Ad description: Gets one ad by ID. tags: - Ads security: - OAuth2: - https://www.googleapis.com/auth/dfatrafficking parameters: - $ref: '#/components/parameters/ProfileId' - $ref: '#/components/parameters/AdId' responses: '200': description: Ad details. content: application/json: schema: $ref: '#/components/schemas/Ad' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK put: operationId: updateAd summary: Google Campaign Manager Update an Ad description: Updates an existing ad. All writable fields must be provided in the request body. tags: - Ads parameters: - $ref: '#/components/parameters/ProfileId' - $ref: '#/components/parameters/AdId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Ad' responses: '200': description: Updated ad. content: application/json: schema: $ref: '#/components/schemas/Ad' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK patch: operationId: patchAd summary: Google Campaign Manager Patch an Ad description: Updates an existing ad. This method supports patch semantics; only the fields specified in the request body are modified. tags: - Ads parameters: - $ref: '#/components/parameters/ProfileId' - $ref: '#/components/parameters/AdId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Ad' responses: '200': description: Patched ad. content: application/json: schema: $ref: '#/components/schemas/Ad' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: MobileCarrier: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title countryDartId: type: string example: '500123' countryCode: type: string example: example_value kind: type: string readOnly: true example: example_value City: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title regionDartId: type: string example: '500123' regionCode: type: string example: example_value countryDartId: type: string example: '500123' countryCode: type: string example: example_value metroCode: type: string example: example_value metroDmaId: type: string example: '500123' kind: type: string readOnly: true example: example_value OperatingSystem: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title desktop: type: boolean example: true mobile: type: boolean example: true kind: type: string readOnly: true example: example_value DayPartTargeting: type: object description: Day part targeting configuration. properties: userLocalTime: type: boolean description: Whether targeting is based on user's local time. example: true hoursOfDay: type: array description: Hours of the day to target (0-23). items: type: integer minimum: 0 maximum: 23 example: [] daysOfWeek: type: array description: Days of the week to target. items: type: string enum: - MONDAY - TUESDAY - WEDNESDAY - THURSDAY - FRIDAY - SATURDAY - SUNDAY example: [] AdsListResponse: type: object description: Ad list response. properties: ads: type: array items: $ref: '#/components/schemas/Ad' example: [] nextPageToken: type: string example: example_value kind: type: string readOnly: true default: dfareporting#adsListResponse example: example_value TechnologyTargeting: type: object description: Technology targeting configuration. properties: browsers: type: array description: Browsers to target. items: $ref: '#/components/schemas/Browser' example: [] platforms: type: array description: Platforms to target. items: $ref: '#/components/schemas/Platform' example: [] operatingSystems: type: array description: Operating systems to target. items: $ref: '#/components/schemas/OperatingSystem' example: [] mobileCarriers: type: array description: Mobile carriers to target. items: $ref: '#/components/schemas/MobileCarrier' example: [] connectionTypes: type: array description: Connection types to target. items: $ref: '#/components/schemas/ConnectionType' example: [] operatingSystemVersions: type: array description: Operating system versions to target. items: $ref: '#/components/schemas/OperatingSystemVersion' example: [] Error: type: object description: Standard Google API error response. properties: error: type: object properties: code: type: integer description: HTTP status code. message: type: string description: Human-readable error message. status: type: string description: Error status string. errors: type: array items: type: object properties: message: type: string domain: type: string reason: type: string example: example_value Platform: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title kind: type: string readOnly: true example: example_value ConnectionType: type: object properties: id: type: string example: abc123 name: type: string example: Example Title kind: type: string readOnly: true example: example_value PostalCode: type: object properties: id: type: string example: abc123 code: type: string example: example_value countryDartId: type: string example: '500123' countryCode: type: string example: example_value kind: type: string readOnly: true example: example_value CreativeAssignment: type: object description: Creative assignment within a creative rotation. properties: creativeId: type: string description: ID of the creative to be assigned. example: '500123' active: type: boolean description: Whether this creative assignment is active. example: true weight: type: integer description: Weight of the creative assignment. example: 10 startTime: type: string format: date-time example: '2026-01-15T10:30:00Z' endTime: type: string format: date-time example: '2026-01-15T10:30:00Z' sequence: type: integer description: Sequence number of the creative assignment. example: 10 clickThroughUrl: $ref: '#/components/schemas/ClickThroughUrl' creativeIdDimensionValue: $ref: '#/components/schemas/DimensionValue' readOnly: true richMediaExitOverrides: type: array items: type: object properties: exitId: type: string clickThroughUrl: $ref: '#/components/schemas/ClickThroughUrl' enabled: type: boolean example: [] Browser: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title browserVersionId: type: string example: '500123' majorVersion: type: string example: example_value minorVersion: type: string example: example_value kind: type: string readOnly: true example: example_value FrequencyCap: type: object description: Frequency cap configuration. properties: impressions: type: integer description: Number of times an individual user can be served the ad. example: 10 duration: type: integer description: Duration of time, in seconds, for this frequency cap. example: 10 LastModifiedInfo: type: object description: Modification timestamp information. properties: time: type: string description: Timestamp of the last change in milliseconds since epoch. example: example_value GeoTargeting: type: object description: Geographic targeting configuration. properties: countries: type: array description: Countries to target. items: $ref: '#/components/schemas/Country' example: [] regions: type: array description: Regions to target. items: $ref: '#/components/schemas/Region' example: [] cities: type: array description: Cities to target. items: $ref: '#/components/schemas/City' example: [] metros: type: array description: Metros to target. items: $ref: '#/components/schemas/Metro' example: [] postalCodes: type: array description: Postal codes to target. items: $ref: '#/components/schemas/PostalCode' example: [] excludeCountries: type: boolean description: Whether to exclude the specified geographic locations. example: true PlacementAssignment: type: object description: Placement assignment for an ad. properties: placementId: type: string description: ID of the placement to be assigned. example: '500123' active: type: boolean description: Whether this placement assignment is active. example: true sslRequired: type: boolean description: Whether the placement requires SSL. example: true placementIdDimensionValue: $ref: '#/components/schemas/DimensionValue' readOnly: true DimensionValue: type: object description: A dimension value used for filtering and reporting. properties: dimensionName: type: string description: The name of the dimension. example: example_value value: type: string description: The value of the dimension. example: example_value id: type: string description: The ID associated with the value. example: abc123 matchType: type: string description: Match type for filtering. enum: - EXACT - BEGINS_WITH - CONTAINS - WILDCARD_EXPRESSION example: EXACT etag: type: string readOnly: true example: example_value kind: type: string readOnly: true default: dfareporting#dimensionValue example: example_value EventTagOverride: type: object description: Event tag override configuration. properties: id: type: string description: ID of the event tag that is overridden. example: abc123 enabled: type: boolean description: Whether this override is enabled. example: true Country: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title countryCode: type: string example: example_value sslEnabled: type: boolean example: true kind: type: string readOnly: true example: example_value Ad: type: object description: A Campaign Manager 360 ad. Ads define the creative content, delivery schedules, targeting rules, and placement assignments that control how advertising is served. required: - name - campaignId - advertiserId - type - startTime - endTime properties: id: type: string description: Ad ID. Read-only, auto-generated field. readOnly: true example: abc123 accountId: type: string description: Account ID of this ad. readOnly: true example: '500123' subaccountId: type: string description: Subaccount ID of this ad. readOnly: true example: '500123' campaignId: type: string description: Campaign ID of this ad. Required on insert. example: '500123' advertiserId: type: string description: Advertiser ID of this ad. Required on insert. example: '500123' name: type: string description: Name of this ad. Must be fewer than 256 characters. maxLength: 256 example: Example Title active: type: boolean description: Whether this ad is active. Cannot be true when archived is true. example: true archived: type: boolean description: Whether this ad is archived. Cannot be true when active is true. default: false example: true comments: type: string description: Comments for this ad. example: example_value startTime: type: string format: date-time description: Date and time that this ad should start serving. Must be in the future for new ads. example: '2026-01-15T10:30:00Z' endTime: type: string format: date-time description: Date and time that this ad should stop serving. Must be after startTime. example: '2026-01-15T10:30:00Z' type: type: string description: Type of ad. Required on insert. enum: - AD_SERVING_STANDARD_AD - AD_SERVING_DEFAULT_AD - AD_SERVING_CLICK_TRACKER - AD_SERVING_TRACKING - AD_SERVING_BRAND_SAFE_AD example: AD_SERVING_STANDARD_AD dynamicClickTracker: type: boolean description: Whether this ad is a dynamic click tracker. Read-only after insert. example: true size: $ref: '#/components/schemas/Size' placementAssignments: type: array description: Placement assignments for this ad. items: $ref: '#/components/schemas/PlacementAssignment' example: [] creativeRotation: $ref: '#/components/schemas/CreativeRotation' deliverySchedule: $ref: '#/components/schemas/DeliverySchedule' geoTargeting: $ref: '#/components/schemas/GeoTargeting' technologyTargeting: $ref: '#/components/schemas/TechnologyTargeting' dayPartTargeting: $ref: '#/components/schemas/DayPartTargeting' eventTagOverrides: type: array description: Event tag overrides for this ad. items: $ref: '#/components/schemas/EventTagOverride' example: [] clickThroughUrl: $ref: '#/components/schemas/ClickThroughUrl' kind: type: string description: Identifies what kind of resource this is. Value is always dfareporting#ad. readOnly: true default: dfareporting#ad example: example_value createInfo: $ref: '#/components/schemas/LastModifiedInfo' readOnly: true lastModifiedInfo: $ref: '#/components/schemas/LastModifiedInfo' readOnly: true idDimensionValue: $ref: '#/components/schemas/DimensionValue' readOnly: true advertiserIdDimensionValue: $ref: '#/components/schemas/DimensionValue' readOnly: true campaignIdDimensionValue: $ref: '#/components/schemas/DimensionValue' readOnly: true Region: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title regionCode: type: string example: example_value countryDartId: type: string example: '500123' countryCode: type: string example: example_value kind: type: string readOnly: true example: example_value OperatingSystemVersion: type: object properties: id: type: string example: abc123 majorVersion: type: string example: example_value minorVersion: type: string example: example_value name: type: string example: Example Title operatingSystem: $ref: '#/components/schemas/OperatingSystem' kind: type: string readOnly: true example: example_value Metro: type: object properties: dartId: type: string example: '500123' name: type: string example: Example Title dmaId: type: string example: '500123' metroCode: type: string example: example_value countryDartId: type: string example: '500123' countryCode: type: string example: example_value kind: type: string readOnly: true example: example_value Size: type: object description: Represents the dimensions of ads, placements, and creatives. properties: id: type: string description: ID of this size. example: abc123 width: type: integer description: Width of this size in pixels. example: 10 height: type: integer description: Height of this size in pixels. example: 10 iab: type: boolean description: Whether this size is an IAB standard size. example: true kind: type: string readOnly: true default: dfareporting#size example: example_value CreativeRotation: type: object description: Creative rotation configuration controlling how creatives are served within an ad. properties: type: type: string description: Type of creative rotation. enum: - CREATIVE_ROTATION_TYPE_SEQUENTIAL - CREATIVE_ROTATION_TYPE_RANDOM example: CREATIVE_ROTATION_TYPE_SEQUENTIAL weightCalculationStrategy: type: string description: Strategy for calculating creative weights. enum: - WEIGHT_STRATEGY_EQUAL - WEIGHT_STRATEGY_CUSTOM - WEIGHT_STRATEGY_HIGHEST_CTR - WEIGHT_STRATEGY_OPTIMIZED example: WEIGHT_STRATEGY_EQUAL creativeAssignments: type: array description: Creative assignments in this creative rotation. items: $ref: '#/components/schemas/CreativeAssignment' example: [] creativeOptimizationConfigurationId: type: string description: Creative optimization configuration used for this creative rotation. example: '500123' ClickThroughUrl: type: object description: Click-through URL configuration. properties: defaultLandingPage: type: boolean description: Whether the campaign default landing page is used. example: true landingPageId: type: string description: ID of the landing page for the click-through URL. example: '500123' customClickThroughUrl: type: string format: uri description: Custom click-through URL. example: https://www.example.com computedClickThroughUrl: type: string format: uri description: Read-only computed click-through URL. Set when either defaultLandingPage or landingPageId is set. readOnly: true example: https://www.example.com DeliverySchedule: type: object description: Delivery schedule configuration for an ad, controlling pacing and priority. properties: impressionRatio: type: string description: Impression ratio for this ad. Used to calculate the relative weight of this ad vs other ads with the same priority. example: example_value priority: type: string description: Serving priority of this delivery schedule. enum: - AD_PRIORITY_01 - AD_PRIORITY_02 - AD_PRIORITY_03 - AD_PRIORITY_04 - AD_PRIORITY_05 - AD_PRIORITY_06 - AD_PRIORITY_07 - AD_PRIORITY_08 - AD_PRIORITY_09 - AD_PRIORITY_10 - AD_PRIORITY_11 - AD_PRIORITY_12 - AD_PRIORITY_13 - AD_PRIORITY_14 - AD_PRIORITY_15 - AD_PRIORITY_16 example: AD_PRIORITY_01 hardCutoff: type: boolean description: Whether or not hard cutoff is enabled. If true, the ad will not serve after the end time. example: true frequencyCap: $ref: '#/components/schemas/FrequencyCap' responses: Forbidden: description: Insufficient permissions for the requested operation. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Authentication required or invalid credentials. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request parameters or malformed request body. content: application/json: schema: $ref: '#/components/schemas/Error' parameters: AdId: name: adId in: path required: true description: Ad ID. schema: type: string pattern: ^\d+$ example: '87654321' PageToken: name: pageToken in: query required: false description: Value of the nextPageToken from the previous result page. schema: type: string MaxResults: name: maxResults in: query required: false description: Maximum number of results to return. Default is 1000. schema: type: integer minimum: 0 maximum: 1000 default: 1000 ProfileId: name: profileId in: path required: true description: The Campaign Manager 360 user profile ID. Each user has a profile for each account they have access to. schema: type: string pattern: ^\d+$ example: '123456' securitySchemes: OAuth2: type: oauth2 description: OAuth 2.0 authentication for accessing Campaign Manager 360 resources. Requires appropriate scopes for trafficking or reporting operations. flows: authorizationCode: authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth tokenUrl: https://oauth2.googleapis.com/token scopes: https://www.googleapis.com/auth/dfareporting: View and manage DoubleClick for Advertisers reports https://www.googleapis.com/auth/dfatrafficking: View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns externalDocs: description: Campaign Manager 360 API Documentation url: https://developers.google.com/doubleclick-advertisers/rest/v4