---
title: "POST /v23/customers/{customersId}/accountLinks:mutate"
method: POST
path: "/v23/customers/{customersId}/accountLinks:mutate"
tags: ["customers"]
---

# POST /v23/customers/{customersId}/accountLinks:mutate

`POST /v23/customers/{customersId}/accountLinks:mutate`

## Request

- Base URL: `https://searchads360.googleapis.com`
- URL: `https://searchads360.googleapis.com/v23/customers/{customersId}/accountLinks:mutate`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/doubleclicksearch`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/doubleclicksearch`
- TypeScript: <https://skmtc.dev/google/apis/searchads360/docs/v23/customers/:customersId/accountLinks:mutate/post.ts> (a function with typed inputs; its response is checked against the schema)

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]()

## Path parameters

- `customersId` string, required

## Request body

- GoogleAdsSearchads360V23ServicesMutateAccountLinkRequest: Request message for AccountLinkService.MutateAccountLink.
  - `operation` GoogleAdsSearchads360V23ServicesAccountLinkOperation: A single update on an account link.
    - `remove` string: Remove operation: A resource name for the account link to remove is expected, in this format: `customers/{customer_id}/accountLinks/{account_link_id}`
    - `update` GoogleAdsSearchads360V23ResourcesAccountLink: Represents the data sharing connection between a Google Ads account and another account
      - `accountLinkId` string, int64: Output only. The ID of the link. This field is read only.
      - `resourceName` string: Immutable. Resource name of the account link. AccountLink resource names have the form: `customers/{customer_id}/accountLinks/{account_link_id}`
      - `status` 'UNSPECIFIED' | 'UNKNOWN' | 'ENABLED' | 'REMOVED' | 'REQUESTED' | 'PENDING_APPROVAL' | 'REJECTED' | 'REVOKED': The status of the link.
      - `thirdPartyAppAnalytics` GoogleAdsSearchads360V23ResourcesThirdPartyAppAnalyticsLinkIdentifier: The identifiers of a Third Party App Analytics Link.
        - `appAnalyticsProviderId` string, int64: Immutable. The ID of the app analytics provider. This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
        - `appId` string: Immutable. A string that uniquely identifies a mobile application from which the data was collected to the Google Ads API. For iOS, the ID string is the 9 digit string that appears at the end of an App Store URL (for example, "422689480" for "Gmail" whose App Store link is https://apps.apple.com/us/app/gmail-email-by-google/id422689480). For Android, the ID string is the application's package name (for example, "com.google.android.gm" for "Gmail" given Google Play link https://play.google.com/store/apps/details?id=com.google.android.gm) This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
        - `appVendor` 'UNSPECIFIED' | 'UNKNOWN' | 'APPLE_APP_STORE' | 'GOOGLE_APP_STORE': Immutable. The vendor of the app. This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
      - `type` 'UNSPECIFIED' | 'UNKNOWN' | 'THIRD_PARTY_APP_ANALYTICS': Output only. The type of the linked account.
    - `updateMask` string, google-fieldmask: FieldMask that determines which resource fields are modified in an update.
  - `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 `200`

Successful response

- GoogleAdsSearchads360V23ServicesMutateAccountLinkResponse: Response message for account link mutate.
  - `partialFailureError` GoogleRpcStatus: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer: The status code, which should be an enum value of google.rpc.Code.
    - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  - `result` GoogleAdsSearchads360V23ServicesMutateAccountLinkResult: The result for the account link mutate.
    - `resourceName` string: Returned for successful operations.

---

[API](https://skmtc.dev/google/apis/searchads360.md) - [All operations](https://skmtc.dev/google/apis/searchads360/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/searchads360/revisions/4a4511f84b18?raw)
