> For the complete documentation index, see [llms.txt](https://publer.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://publer.com/docs/posting/delete-posts.md).

# Deleting Posts

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

{% hint style="warning" %}

### Warning

If the `post_ids` query parameter is **omitted**, this endpoint will delete **all non-published posts** in the workspace that you have permission to delete. This includes:

* Scheduled posts
* Draft posts
* Auto-scheduled posts
* Recycle posts
* Recurring posts
* Pending posts
* Other unpublished post states

**Published posts are never deleted when `post_ids` is omitted.**

Use this operation with caution, as it performs a bulk deletion.
{% endhint %}

### Requirements

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

### Endpoint

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

Deletes one or more posts based on the provided IDs. If no `post_ids` are provided, all unpublished posts that you have permission to delete will be removed.

#### Query Parameters

<table data-header-hidden><thead><tr><th width="110.401123046875"></th><th width="84.6837158203125"></th><th width="101.6964111328125"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Type</td><td>Required</td><td>Description</td></tr><tr><td>post_ids</td><td>array</td><td>Yes</td><td>Array of post IDs to delete. If omitted, <strong>all unpublished posts</strong> (scheduled, drafts, recycle, recurring, auto-scheduled, pending, etc.) that you have permission to delete will be deleted. Published posts are excluded.</td></tr></tbody></table>

### 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

Restrictions:

* 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.

```json
{"openapi":"3.1.1","info":{"title":"Publer API","version":"1.0.0"},"tags":[{"name":"Posts","description":"Endpoints for managing social media posts"}],"servers":[{"url":"https://app.publer.com/api/v1"}],"security":[{"BearerApiAuth":[]}],"components":{"securitySchemes":{"BearerApiAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"API key authentication. Format: \"Bearer-API YOUR_API_KEY\""}},"schemas":{"401ErrorResponseWithWorkspace":{"type":"object","properties":{"errors":{"type":"array","description":"List of error messages","items":{"type":"string"}}}},"403ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","description":"List of error messages","items":{"type":"string"}}}}}},"paths":{"/posts":{"delete":{"summary":"Delete Multiple Posts","description":"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.","tags":["Posts"],"parameters":[{"schema":{"type":"string"},"name":"Publer-Workspace-Id","in":"header","description":"ID of the workspace containing the posts","required":true},{"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"name":"post_ids","in":"query","description":"Array of post IDs to delete. Can include both MongoDB ObjectIDs and PostgreSQL IDs.","required":true}],"responses":{"200":{"description":"Posts deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"deleted_ids":{"type":"array","description":"Array of IDs of successfully deleted posts","items":{"type":"string"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401ErrorResponseWithWorkspace"}}}},"403":{"description":"Permission denied or missing required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/403ErrorResponse"}}}}}}}}}
```

### Related Resources

* [List Posts API](/docs/api-reference/posts.md) - Retrieve and filter posts
* [Update Posts API](/docs/posting/update-posts.md) - Modify existing posts


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://publer.com/docs/posting/delete-posts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
