Skip to Content
Posts

Cancel every scheduled channel of a post

Cancels, in one transaction, every publication of the post that is still scheduled. Drafts, published and failed channels are left as they are, and nothing is deleted: the cancelled publications stay in the post history. Pass expectedPublicationIds (the scheduled channels the person confirmed) to refuse with write_conflict when that set changed meanwhile. A channel being delivered right now refuses the whole request with invalid_transition. API keys need publication:dispatch.

POST
/api/projects/{projectId}/posts/{postId}/cancel

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
expectedPublicationIds?array<>
Itemsitems <= 100

Response Body

Response for status 200

application/json
  1. response
publications*array<>
Example Request
curl -X POST 'https://postdot.example/api/projects/string/posts/string/cancel' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "publications": [
    {
      "id": "string",
      "projectId": "string",
      "postId": "string",
      "channelId": "string",
      "targetRevisionId": "string",
      "deliveryMode": "manual",
      "reviewState": "compatible",
      "state": "draft",
      "scheduledAt": -9007199254740991,
      "publishedAt": -9007199254740991,
      "externalId": "string",
      "externalUrl": "string",
      "errorMessage": "string",
      "createdByActorId": "string",
      "scheduledByActorId": "string",
      "stateChangedByActorId": "string",
      "publishedByActorId": "string",
      "lastAssessedProfileVersionId": "string",
      "createdAt": -9007199254740991,
      "updatedAt": -9007199254740991,
      "profileAssessmentIssues": [
        {}
      ],
      "remoteRemoval": {
        "state": "running",
        "removedAt": 0,
        "removedBy": {
          "id": "string",
          "displayName": "string"
        },
        "errorMessage": "string",
        "errorCode": "string",
        "requiresReconnect": true,
        "requestedAt": 0
      }
    }
  ]
}

Was this page helpful?