Method: customers.accountLinks.mutate

Creates or removes an account link. From V5, create is not supported through AccountLinkService.MutateAccountLink. Use AccountLinkService.CreateAccountLink instead.

List of thrown errors: AccountLinkError AuthenticationError AuthorizationError FieldMaskError HeaderError InternalError MutateError QuotaError RequestError

HTTP request

POST https://googleads.googleapis.com/v16/customers/{customerId}/accountLinks:mutate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customerId

string

Required. The ID of the customer being modified.

Request body

The request body contains data with the following structure:

JSON representation
{
  "operation": {
    object (AccountLinkOperation)
  },
  "partialFailure": boolean,
  "validateOnly": boolean
}
Fields
operation

object (AccountLinkOperation)

Required. The operation to perform on the link.

partialFailure

boolean

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validateOnly

boolean

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

Response body

Response message for account link mutate.

If successful, the response body contains data with the following structure:

JSON representation
{
  "result": {
    object (MutateAccountLinkResult)
  },
  "partialFailureError": {
    object (Status)
  }
}
Fields
result

object (MutateAccountLinkResult)

Result for the mutate.

partialFailureError

object (Status)

Errors that pertain to operation failures in the partial failure mode. Returned only when partialFailure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors), we return an RPC level error.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

AccountLinkOperation

A single update on an account link.

JSON representation
{
  "updateMask": string,

  // Union field operation can be only one of the following:
  "update": {
    object (AccountLink)
  },
  "remove": string
  // End of list of possible types for union field operation.
}
Fields
updateMask

string (FieldMask format)

FieldMask that determines which resource fields are modified in an update.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Union field operation. The operation to perform. operation can be only one of the following:
update

object (AccountLink)

Update operation: The account link is expected to have a valid resource name.

remove

string

Remove operation: A resource name for the account link to remove is expected, in this format:

customers/{customerId}/accountLinks/{accountLinkId}

MutateAccountLinkResult

The result for the account link mutate.

JSON representation
{
  "resourceName": string
}
Fields
resourceName

string

Returned for successful operations.