Google Campaign Manager Campaigns API

Manage advertising campaigns. Campaigns serve as top-level organizational containers that group ads, placements, and creatives under a single advertiser with shared start and end dates, budgets, and targeting configurations.

GitHub OpenAPI
Business capability
Digital Marketing Management BC-400.60

Operations 5

POST /dfareporting/v5/userprofiles/{userprofilesId}/campaigns Insert campaigns #
PUT /dfareporting/v5/userprofiles/{userprofilesId}/campaigns Update campaigns #
PATCH /dfareporting/v5/userprofiles/{userprofilesId}/campaigns Patch campaigns #
GET /dfareporting/v5/userprofiles/{userprofilesId}/campaigns List campaigns #
GET /dfareporting/v5/userprofiles/{userprofilesId}/campaigns/{campaignsId} Get campaigns #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-campaign-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-dimension-value-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-last-modified-info-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-audience-segment-group-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-audience-segment-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-event-tag-override-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-click-through-url-suffix-properties-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-default-click-through-event-tag-properties-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-creative-optimization-configuration-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-optimization-activity-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-ad-blocking-configuration-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-measurement-partner-link-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-campaigns-list-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-error-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-campaign-manager:google-campaign-manager-campaigns-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-campaign-manager-campaigns-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Campaign Manager 360 Campaigns API
  version: v5
  description: Generated from Google's published Discovery document for Campaign Manager 360 API (dfareporting v5, revision 20261107). 5 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://dfareporting.googleapis.com
tags:
- name: Campaigns
paths:
  /dfareporting/v5/userprofiles/{userprofilesId}/campaigns:
    post:
      operationId: dfareporting.campaigns.insert
      summary: Insert campaigns
      description: Inserts a new campaign.
      parameters:
      - name: userprofilesId
        in: path
        required: true
        description: Resource name segment (userprofilesId).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Campaign'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/dfatrafficking
      - apiKey: []
      tags:
      - Campaigns
    put:
      operationId: dfareporting.campaigns.update
      summary: Update campaigns
      description: Updates an existing campaign.
      parameters:
      - name: userprofilesId
        in: path
        required: true
        description: Resource name segment (userprofilesId).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Campaign'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/dfatrafficking
      - apiKey: []
      tags:
      - Campaigns
    patch:
      operationId: dfareporting.campaigns.patch
      summary: Patch campaigns
      description: Updates an existing campaign. This method supports patch semantics.
      parameters:
      - name: userprofilesId
        in: path
        required: true
        description: Resource name segment (userprofilesId).
        schema:
          type: string
      - name: id
        in: query
        required: true
        description: Required. Campaign ID.
        schema:
          type: string
          format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Campaign'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/dfatrafficking
      - apiKey: []
      tags:
      - Campaigns
    get:
      operationId: dfareporting.campaigns.list
      summary: List campaigns
      description: Retrieves a list of campaigns, possibly filtered. This method supports paging.
      parameters:
      - name: userprofilesId
        in: path
        required: true
        description: Resource name segment (userprofilesId).
        schema:
          type: string
      - name: advertiserGroupIds
        in: query
        required: false
        description: Select only campaigns whose advertisers belong to these advertiser groups.
        schema:
          type: array
          items:
            type: string
            format: int64
      - name: advertiserIds
        in: query
        required: false
        description: Select only campaigns that belong to these advertisers.
        schema:
          type: array
          items:
            type: string
            format: int64
      - name: archived
        in: query
        required: false
        description: Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.
        schema:
          type: boolean
      - name: atLeastOneOptimizationActivity
        in: query
        required: false
        description: Select only campaigns that have at least one optimization activity.
        schema:
          type: boolean
      - name: excludedIds
        in: query
        required: false
        description: Exclude campaigns with these IDs.
        schema:
          type: array
          items:
            type: string
            format: int64
      - name: ids
        in: query
        required: false
        description: Select only campaigns with these IDs.
        schema:
          type: array
          items:
            format: int64
            type: string
      - name: maxResults
        in: query
        required: false
        description: Maximum number of results to return.
        schema:
          type: integer
          format: int32
          default: '1000'
      - name: overriddenEventTagId
        in: query
        required: false
        description: Select only campaigns that have overridden this event tag ID.
        schema:
          type: string
          format: int64
      - name: pageToken
        in: query
        required: false
        description: Value of the nextPageToken from the previous result page.
        schema:
          type: string
      - name: searchString
        in: query
        required: false
        description: Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign June 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015", or simply "campaign".
        schema:
          type: string
      - name: sortField
        in: query
        required: false
        description: Field by which to sort the list.
        schema:
          enum:
          - ID
          - NAME
          default: ID
          type: string
      - name: sortOrder
        in: query
        required: false
        description: Order of sorted results.
        schema:
          enum:
          - ASCENDING
          - DESCENDING
          type: string
          default: ASCENDING
      - name: subaccountId
        in: query
        required: false
        description: Select only campaigns that belong to this subaccount.
        schema:
          type: string
          format: int64
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignsListResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/dfatrafficking
      - apiKey: []
      tags:
      - Campaigns
  /dfareporting/v5/userprofiles/{userprofilesId}/campaigns/{campaignsId}:
    get:
      operationId: dfareporting.campaigns.get
      summary: Get campaigns
      description: Gets one campaign by ID.
      parameters:
      - name: userprofilesId
        in: path
        required: true
        description: Resource name segment (userprofilesId).
        schema:
          type: string
      - name: campaignsId
        in: path
        required: true
        description: Resource name segment (campaignsId).
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/dfatrafficking
      - apiKey: []
      tags:
      - Campaigns
components:
  schemas:
    AudienceSegment:
      description: Audience Segment.
      type: object
      properties:
        allocation:
          format: int32
          description: Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive.
          type: integer
        name:
          type: string
          description: Name of this audience segment. This is a required field and must be less than 65 characters long.
        id:
          type: string
          description: ID of this audience segment. This is a read-only, auto-generated field.
          format: int64
    Campaign:
      description: Contains properties of a Campaign Manager campaign.
      properties:
        additionalCreativeOptimizationConfigurations:
          description: Additional creative optimization configurations for the campaign.
          items:
            $ref: '#/components/schemas/CreativeOptimizationConfiguration'
          type: array
        archived:
          type: boolean
          description: Whether this campaign has been archived.
        adBlockingConfiguration:
          $ref: '#/components/schemas/AdBlockingConfiguration'
          description: Ad blocking settings for this campaign.
        name:
          description: Name of this campaign. This is a required field and must be less than 512 characters long and unique among campaigns of the same advertiser.
          type: string
        defaultClickThroughEventTagProperties:
          $ref: '#/components/schemas/DefaultClickThroughEventTagProperties'
          description: Click-through event tag ID override properties for this campaign.
        advertiserIdDimensionValue:
          $ref: '#/components/schemas/DimensionValue'
          description: Dimension value for the advertiser ID of this campaign. This is a read-only, auto-generated field.
        startDate:
          type: string
          format: date
        subaccountId:
          description: Subaccount ID of this campaign. This is a read-only field that can be left blank.
          format: int64
          type: string
        advertiserGroupId:
          format: int64
          type: string
          description: Advertiser group ID of the associated advertiser.
        clickThroughUrlSuffixProperties:
          $ref: '#/components/schemas/ClickThroughUrlSuffixProperties'
          description: Click-through URL suffix override properties for this campaign.
        endDate:
          type: string
          format: date
        id:
          description: ID of this campaign. This is a read-only auto-generated field.
          format: int64
          type: string
        defaultLandingPageId:
          format: int64
          type: string
          description: The default landing page ID for this campaign.
        measurementPartnerLink:
          $ref: '#/components/schemas/MeasurementPartnerCampaignLink'
          description: Measurement partner campaign link for tag wrapping.
        lastModifiedInfo:
          $ref: '#/components/schemas/LastModifiedInfo'
          description: Information about the most recent modification of this campaign. This is a read-only field.
        createInfo:
          $ref: '#/components/schemas/LastModifiedInfo'
          description: Information about the creation of this campaign. This is a read-only field.
        idDimensionValue:
          $ref: '#/components/schemas/DimensionValue'
          description: Dimension value for the ID of this campaign. This is a read-only, auto-generated field.
        creativeOptimizationConfiguration:
          $ref: '#/components/schemas/CreativeOptimizationConfiguration'
          description: Creative optimization configuration for the campaign.
        comment:
          description: Arbitrary comments about this campaign. Must be less than 256 characters long.
          type: string
        accountId:
          description: Account ID of this campaign. This is a read-only field that can be left blank.
          format: int64
          type: string
        eventTagOverrides:
          description: Overrides that can be used to activate or deactivate advertiser event tags.
          items:
            $ref: '#/components/schemas/EventTagOverride'
          type: array
        kind:
          description: 'Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaign".'
          type: string
        advertiserId:
          format: int64
          type: string
          description: Advertiser ID of this campaign. This is a required field.
        creativeGroupIds:
          items:
            type: string
            format: int64
          description: List of creative group IDs that are assigned to the campaign.
          type: array
        audienceSegmentGroups:
          type: array
          description: Audience segment groups assigned to this campaign. Cannot have more than 300 segment groups.
          items:
            $ref: '#/components/schemas/AudienceSegmentGroup'
        externalId:
          description: External ID for this campaign.
          type: string
        euPoliticalAdsDeclaration:
          type: string
          description: Optional. Whether the campaign has EU political ads. Campaign Manager 360 doesn't allow campaigns with EU political ads to serve in the EU. They can still serve in other regions.
          enum:
          - CONTAINS_EU_POLITICAL_ADS
          - DOES_NOT_CONTAIN_EU_POLITICAL_ADS
        billingInvoiceCode:
          description: Billing invoice code included in the Campaign Manager client billing invoices associated with the campaign.
          type: string
      type: object
    ClickThroughUrlSuffixProperties:
      type: object
      description: Click Through URL Suffix settings.
      properties:
        overrideInheritedSuffix:
          description: Whether this entity should override the inherited click-through URL suffix with its own defined value.
          type: boolean
        clickThroughUrlSuffix:
          type: string
          description: Click-through URL suffix to apply to all ads in this entity's scope. Must be less than 128 characters long.
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    LastModifiedInfo:
      description: Modification timestamp.
      properties:
        time:
          type: string
          description: Timestamp of the last change in milliseconds since epoch.
          format: int64
      type: object
    EventTagOverride:
      type: object
      description: Event tag override information.
      properties:
        id:
          format: int64
          type: string
          description: ID of this event tag override. This is a read-only, auto-generated field.
        enabled:
          type: boolean
          description: Whether this override is enabled.
    OptimizationActivity:
      description: Creative optimization activity.
      properties:
        weight:
          format: int32
          description: Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1.
          type: integer
        floodlightActivityIdDimensionValue:
          $ref: '#/components/schemas/DimensionValue'
          description: Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field.
        floodlightActivityId:
          description: Floodlight activity ID of this optimization activity. This is a required field.
          type: string
          format: int64
      type: object
    CampaignsListResponse:
      properties:
        kind:
          description: 'Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignsListResponse".'
          type: string
        nextPageToken:
          type: string
          description: Pagination token to be used for the next list operation.
        campaigns:
          description: Campaign collection.
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
      type: object
      description: Campaign List Response
    AdBlockingConfiguration:
      properties:
        enabled:
          type: boolean
          description: Whether this campaign has enabled ad blocking. When true, ad blocking is enabled for placements in the campaign, but this may be overridden by site and placement settings. When false, ad blocking is disabled for all placements under the campaign, regardless of site and placement settings.
      type: object
      description: Campaign ad blocking settings.
    DimensionValue:
      type: object
      description: Represents a DimensionValue resource.
      properties:
        id:
          type: string
          description: The ID associated with the value if available.
        value:
          type: string
          description: The value of the dimension.
        dimensionName:
          description: The name of the dimension.
          type: string
        matchType:
          type: string
          enum:
          - EXACT
          - BEGINS_WITH
          - CONTAINS
          - WILDCARD_EXPRESSION
          description: Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
        etag:
          type: string
          description: The eTag of this response for caching purposes.
        kind:
          description: The kind of resource this is, in this case dfareporting#dimensionValue.
          type: string
    MeasurementPartnerCampaignLink:
      properties:
        partnerCampaignId:
          description: Partner campaign ID needed for establishing linking with Measurement partner.
          type: string
        measurementPartner:
          description: Measurement partner used for tag wrapping.
          type: string
          enum:
          - NONE
          - INTEGRAL_AD_SCIENCE
          - DOUBLE_VERIFY
        linkStatus:
          type: string
          description: .
          enum:
          - MEASUREMENT_PARTNER_UNLINKED
          - MEASUREMENT_PARTNER_LINKED
          - MEASUREMENT_PARTNER_LINK_PENDING
          - MEASUREMENT_PARTNER_LINK_FAILURE
          - MEASUREMENT_PARTNER_LINK_OPT_OUT
          - MEASUREMENT_PARTNER_LINK_OPT_OUT_PENDING
          - MEASUREMENT_PARTNER_LINK_WRAPPING_PENDING
          - MEASUREMENT_PARTNER_MODE_CHANGE_PENDING
          - MEASUREMENT_PARTNER_UNLINK_PENDING
      type: object
    CreativeOptimizationConfiguration:
      type: object
      properties:
        optimizationModel:
          description: Optimization model for this configuration.
          type: string
          enum:
          - CLICK
          - POST_CLICK
          - POST_IMPRESSION
          - POST_CLICK_AND_IMPRESSION
          - VIDEO_COMPLETION
        id:
          type: string
          format: int64
          description: ID of this creative optimization config. This field is auto-generated when the campaign is inserted or updated. It can be null for existing campaigns.
        name:
          type: string
          description: Name of this creative optimization config. This is a required field and must be less than 129 characters long.
        optimizationActivitys:
          items:
            $ref: '#/components/schemas/OptimizationActivity'
          description: List of optimization activities associated with this configuration.
          type: array
      description: Creative optimization settings.
    AudienceSegmentGroup:
      description: Audience Segment Group.
      type: object
      properties:
        id:
          description: ID of this audience segment group. This is a read-only, auto-generated field.
          type: string
          format: int64
        audienceSegments:
          description: Audience segments assigned to this group. The number of segments must be between 2 and 100.
          items:
            $ref: '#/components/schemas/AudienceSegment'
          type: array
        name:
          type: string
          description: Name of this audience segment group. This is a required field and must be less than 65 characters long.
    DefaultClickThroughEventTagProperties:
      type: object
      properties:
        overrideInheritedEventTag:
          type: boolean
          description: Whether this entity should override the inherited default click-through event tag with its own defined value.
        defaultClickThroughEventTagId:
          type: string
          description: ID of the click-through event tag to apply to all ads in this entity's scope.
          format: int64
      description: Properties of inheriting and overriding the default click-through event tag. A campaign may override the event tag defined at the advertiser level, and an ad may also override the campaign's setting further.
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/ddmconversions: Manage DoubleClick Digital Marketing conversions
            https://www.googleapis.com/auth/dfatrafficking: View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns
            https://www.googleapis.com/auth/dfareporting: View and manage DoubleClick for Advertisers reports
externalDocs:
  url: https://developers.google.com/doubleclick-advertisers/
x-provenance:
  method: harvested
  publisher: Google
  source: https://dfareporting.googleapis.com/$discovery/rest?version=v5
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261107)