> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# DeleteAccount

# Package: googleAds

# Namespace: AccountService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-account-v1/delete-account.md

## Permission Scopes:
Manage google ads campaigns: SCOPE.PROMOTE.MANAGE-GOOGLE-ADS

## Introduction

Deletes the Google Ads account and removes its link to the Wix site.

---

## REST API

### Schema

```
 Method: deleteAccount
 Description: Deletes the Google Ads account and removes its link to the Wix site.
 URL: https://www.wixapis.com/_serverless/pa-google/v1/accounts/{accountId}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  accountId
 Method parameters: 
   param name: accountId | type:   none | required: true 
 Return type: DeleteAccountResponse
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACCOUNT_NOT_FOUND | Description: Couldn't find the account.


```

### Examples

### Delete Account
```curl
curl -X DELETE \
  'https://www.wixapis.com/google-ads/v1/accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGoogleAds.accounts.deleteAccount(accountId)
 Description: Deletes the Google Ads account and removes its link to the Wix site.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  accountId
 Method parameters: 
   param name: accountId | type: string | description: GUID of the account to delete. | required: true | validation: format GUID
 Return type: PROMISE<DeleteAccountResponse>
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACCOUNT_NOT_FOUND | Description: Couldn't find the account.


```

### Examples

### Delete a Google Ads account
```javascript
import { accounts } from '@wix/promote-google-ads';

await accounts.deleteAccount('a1b2c3d4-e5f6-7890-abcd-ef1234567890');

```

### deleteAccount (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { accounts } from '@wix/promote-google-ads';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { accounts },
  // Include the auth strategy and host as relevant
});


async function deleteAccount(accountId) {
  const response = await myWixClient.accounts.deleteAccount(accountId);
};
```

---