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

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

POST https://googleads.googleapis.com/v8/customers/{customerId}/campaignExperiments:create

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customerId

string

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
}
Fields
campaignExperiment

object (CampaignExperiment)

Required. The campaign experiment to be created.

validateOnly

boolean

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:

  • https://www.googleapis.com/auth/adwords

For more information, see the OAuth 2.0 Overview.