Skip to Content
Posts

Move a post to the trash

Moves the post to the trash, where it stays for the installation retention period (30 days by default) before it is deleted forever. Channels still scheduled are cancelled in the same step, with their usual publication.cancelled events, and a pending retry of a failed channel is cancelled. Refused with post_sending while a channel is being sent and with post_needs_answer while a channel waits for someone to record what happened. Removing a post with a published channel requires a project owner, or an editor when the project policy editorsCanRemovePublishedPosts is on; it removes the post from Postdot only, never from the platform. Pass expectedPublishedPublicationIds (the published channels the person confirmed) to refuse with write_conflict when that set changed meanwhile. Emits post.deleted. API keys need publication:delete.

DELETE
/api/projects/{projectId}/posts/{postId}

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Path Parameters

projectId*string
Length1 <= length
postId*string
Length1 <= length

Request Body

  1. body
expectedPublishedPublicationIds?array<>
Itemsitems <= 100

Response Body

Response for status 200

application/json
  1. response
post*
Example Request
curl -X DELETE 'https://postdot.example/api/projects/string/posts/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "post": {
    "id": "string",
    "projectId": "string",
    "title": "string",
    "sourceExcerpt": "string",
    "createdAt": 0,
    "deletedAt": 0,
    "purgeAt": 0,
    "deletedBy": {
      "id": "string",
      "displayName": "string"
    },
    "publications": [
      {
        "id": "string",
        "channelId": "string",
        "channelName": "string",
        "state": "draft",
        "deliveryMode": "manual",
        "scheduledAt": 0,
        "publishedAt": 0,
        "externalUrl": "string"
      }
    ]
  }
}

Was this page helpful?