Skip to main content
POST
/
api
/
partner
/
v1
/
posts
/
delete
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"
    ]
  }'
{
  "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"
    }
  }
}
Delete one or many posts in a single request. The endpoint enforces workspace scope, cleans up provider-side artifacts, and reports a per-ID result so your integration can surface partial successes.

Body Parameters

postIds
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.
All IDs must belong to the authenticated workspace or a workspace delegated to the key. IDs outside your scope are treated as skipped.

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

deletedIds
array
IDs that were permanently removed. Order matches the request order after duplicates are stripped.
blockedStatuses
array
Entries of {(id, status)} describing posts that failed the status guardrail.
skipped
array
IDs that were not found under the workspace scope (already deleted, outside the workspace, or never existed).
errors
object
Optional. Keyed by post ID when the database delete fails. A batch can still return 200 with a populated errors map.

Request Example

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"
    ]
  }'

Response Example

{
  "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"
    }
  }
}

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/403 — authentication failed or the key lacks workspace access
  • 500 bulk_delete_failed — unexpected server error (all attempted IDs are still reported in the response body when possible)