PostMantis
API ReferencePosts

Cancel a scheduled post

Cancels a scheduled post and its pending deliveries. Only posts in `scheduled` status that have not started delivery can be canceled. Requires write permission.

POST
/api/v1/posts/{postId}/cancel

Cancels a scheduled post and its pending deliveries. Only posts in scheduled status that have not started delivery can be canceled. Requires write permission.

Authorization

BearerAuth
AuthorizationBearer <token>

PostMantis API key from the dashboard. Include as Authorization: Bearer <key>.

In: header

Path Parameters

postId*string

Post UUID

Formatuuid

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/posts/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "pending",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "media": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "artifactId": "706a3f1e-c357-4634-b1bf-20c221b5bb4e",        "artifactStatus": "reserved",        "contentType": "string",        "url": "http://example.com",        "alt": "string"      }    ],    "deliveries": [      {        "provider": "x",        "profileName": "string",        "status": "pending",        "providerOptions": {          "property1": null,          "property2": null        },        "profileId": "faebe71b-2bf8-4bdb-9b67-258e4d6aa00a",        "scheduledAt": "2019-08-24T14:15:22Z",        "publishedAt": "2019-08-24T14:15:22Z",        "failedAt": "2019-08-24T14:15:22Z",        "providerPostId": "string",        "url": "http://example.com",        "errorMessage": "string"      }    ],    "body": "string",    "scheduledAt": "2019-08-24T14:15:22Z",    "canceledAt": "2019-08-24T14:15:22Z"  }}