Remove one or multiple posts—of any state—from your workspace. This endpoint enforces role-based permissions and state-specific restrictions.

### Requirements

- **Authentication**: Bearer API token
- **Scope**: `posts`
- **Headers**:
  - `Authorization: Bearer-API YOUR_API_KEY`
  - `Publer-Workspace-Id: YOUR_WORKSPACE_ID`

### Endpoint

```
DELETE /api/v1/posts
```

Deletes one or more posts based on the provided IDs.

#### Query Parameters

| Parameter   | Type   | Required | Description                              |
|-------------|--------|----------|------------------------------------------|
| post_ids    | array  | Yes      | Array of post IDs to delete              |

### Authorization Rules

- You may delete:
  - Posts you created
  - Posts in workspaces you own
  - Posts in workspaces where you have “post action” access
  - **Private drafts**: only their creator can delete
  - **Published posts requiring approval**: restricted roles (e.g., editors) cannot delete
  - **Queued posts** (except reminders): cannot be deleted

Pending-state deletions trigger a notification to the creator before removal.

### Delete Multiple Posts

Deletes one or multiple posts from the workspace specifying exact post IDs. Authorization rules apply to ensure users can only delete posts they have permission to delete.

#### Authorizations

- **Authorization**: API key authentication. Format: "Bearer-API YOUR_API_KEY"

#### Query parameters

- **post_ids**: Array of post IDs to delete. Can include both MongoDB ObjectIDs and PostgreSQL IDs.

#### Header parameters

- **Publer-Workspace-Id**: ID of the workspace containing the posts

#### Responses

- **200**: Posts deleted successfully
  - `{ "deleted_ids": ["text"] }`
- **401**: Unauthorized
- **403**: Permission denied or missing required scope

### Example Request

```
DELETE /api/v1/posts?post_ids=text HTTP/1.1
Host: app.publer.com
Authorization: YOUR_API_KEY
Publer-Workspace-Id: text
Accept: */*
```

### Test it

- **200**: Posts deleted successfully
  - Expected response:
  
```
{
  "deleted_ids": [
    "text"
  ]
}
```

### Related Resources

- [List Posts API](https://publer.com/docs/api-reference/posts) - Retrieve and filter posts
- [Update Posts API](https://publer.com/docs/posting/update-posts) - Modify existing posts
