> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genviral.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Posts

> Delete one or many posts with a single request

Delete one or many posts in a single request. The endpoint enforces key
scope, cleans up provider-side artifacts, and reports a per-ID result so your
integration can surface partial successes.

## Body Parameters

<ParamField body="postIds" type="array" required>
  Array of post UUIDs (minimum 1, maximum 50). Duplicates are removed before
  processing. The API accepts both `postIds` (preferred) and the snake\_case
  alias `post_ids`.
</ParamField>

<Note>
  All IDs must belong to the authenticated key scope. IDs outside scope are
  treated as `skipped`.
</Note>

## Status Guardrails

* **Deletable:** `draft`, `pending`, `scheduled`, `retry`, `failed`
* **Blocked:** `posted`, `canceled`, `partial`

Posts that already finished publishing (`posted`) or that have been canceled /
partially published are immutable. They are returned inside
`blockedStatuses` so you can surface the exact status that blocked deletion.

## Response

<ResponseField name="deletedIds" type="array">
  IDs that were permanently removed. Order matches the request order after
  duplicates are stripped.
</ResponseField>

<ResponseField name="blockedStatuses" type="array">
  Entries of `{(id, status)}` describing posts that failed the status guardrail.
</ResponseField>

<ResponseField name="skipped" type="array">
  IDs that were not found under key scope (already deleted, outside scope, or
  never existed).
</ResponseField>

<ResponseField name="errors" type="object">
  Optional. Keyed by post ID when the database delete fails. A batch can still
  return `200` with a populated `errors` map.
</ResponseField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://www.genviral.io/api/partner/v1/posts/delete \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "postIds": [
        "0f4f54d4-8cce-4fb7-8c7b-befbcb8af812",
        "c218bffa-96db-4d9b-aa66-2b77797fc8bb",
        "93f546e4-4fb1-4013-8e40-89a93c789e90"
      ]
    }'
  ```
</RequestExample>

## Response Example

<ResponseExample>
  ```json Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Posts deleted",
    "data": {
      "deletedIds": [
        "0f4f54d4-8cce-4fb7-8c7b-befbcb8af812",
        "c218bffa-96db-4d9b-aa66-2b77797fc8bb"
      ],
      "blockedStatuses": [
        { "id": "93f546e4-4fb1-4013-8e40-89a93c789e90", "status": "posted" }
      ],
      "skipped": ["ce02a150-0d9a-46d5-a3e4-5a3a1bdacf6f"],
      "errors": {
        "52fd0fa4-b19f-4a02-a5a5-5ed78a55ce72": "Failed to delete post"
      }
    }
  }
  ```
</ResponseExample>

## Error Responses

* `400 invalid_json` - body is not valid JSON
* `422 invalid_payload` - missing/invalid `postIds`
* `400 too_many_post_ids` - more than 50 IDs supplied
* `401` - authentication failed (missing/invalid/revoked token)
* `402 subscription_required` - active Creator/Professional/Business plan required
* `403 tier_not_allowed` - Scheduler tier cannot use Partner API
* `500 bulk_delete_failed` - unexpected server error (all attempted IDs are
  still reported in the response body when possible)
