> 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

# DeleteItem

# Package: socialMedia

# Namespace: PublicationService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/social-media/item-v1/delete-item.md

## Permission Scopes:
Manage Social Posts: SCOPE.PROMOTE.MANAGE-SOCIAL-POSTS

## Introduction

Deletes an item.

---

## REST API

### Schema

```
 Method: deleteItem
 Description: Deletes an item.
 URL: https://www.wixapis.com/social-publisher/v1/items/{id}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  id
 Method parameters: 
   param name: id | type:   none | required: true 
 Return type: DeleteItemResponse
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ITEM_NOT_EXISTS | Description: Couldn't find the item.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: ITEM_IS_DELETED | Description: The item was already deleted.


```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGrowthToolsPublisher.items.deleteItem(_id)
 Description: Deletes an item.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  _id
 Method parameters: 
   param name: _id | type: string   | required: true | validation: format GUID
 Return type: PROMISE<DeleteItemResponse>
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ITEM_NOT_EXISTS | Description: Couldn't find the item.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: ITEM_IS_DELETED | Description: The item was already deleted.


```

### Examples

### deleteItem
```javascript
import { items } from '@wix/promote-growth-tools-publisher';

async function deleteItem(_id) {
  const response = await items.deleteItem(_id);
};
```

### deleteItem (with elevated permissions)
```javascript
import { items } from '@wix/promote-growth-tools-publisher';
import { auth } from '@wix/essentials';

async function myDeleteItemMethod(_id) {
  const elevatedDeleteItem = auth.elevate(items.deleteItem);
  const response = await elevatedDeleteItem(_id);
}
```

### deleteItem (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 { items } from '@wix/promote-growth-tools-publisher';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function deleteItem(_id) {
  const response = await myWixClient.items.deleteItem(_id);
};
```

---