Caution: You are viewing documentation for the API's REST interface. Most of our official client libraries use gRPC. See the REST Introduction for details.

Method: customers.campaignExperiments.create

Stay organized with collections Save and categorize content based on your preferences.

Creates a campaign experiment based on a campaign draft. The draft campaign will be forked into a real campaign (called the experiment campaign) that will begin serving ads if successfully created.

The campaign experiment is created immediately with status INITIALIZING. This method return a long running operation that tracks the forking of the draft campaign. If the forking fails, a list of errors can be retrieved using the campaignExperiments.listAsyncErrors method. The operation's metadata will be a StringValue containing the resource name of the created campaign experiment.

List of thrown errors: AuthenticationError AuthorizationError CampaignExperimentError DatabaseError DateError DateRangeError FieldError HeaderError InternalError QuotaError RangeError RequestError

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The ID of the customer whose campaign experiment is being created.

Request body

The request body contains data with the following structure:

JSON representation
  "campaignExperiment": {
    object (CampaignExperiment)
  "validateOnly": boolean

object (CampaignExperiment)

Required. The campaign experiment to be created.



If true, the request is validated but not executed. Only errors are returned, not results.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:


For more information, see the OAuth 2.0 Overview.