PostMantis
API ReferencePosts

Delete a draft post

Deletes a local draft that has not been published or scheduled. Use this only for drafts you want to discard entirely. Use cancel instead for scheduled posts so the record and history remain inspectable.

DELETE
/api/posts/{postId}

Deletes a local draft that has not been published or scheduled. Use this only for drafts you want to discard entirely. Use cancel instead for scheduled posts so the record and history remain inspectable.

Authorization

BearerAuth
AuthorizationBearer <token>

API key from the PostMantis dashboard.

In: header

Path Parameters

postId*string

Post identifier.

Formatuuid

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/json

curl -X DELETE "https://loading/api/posts/74d6f3d9-6b68-4a2d-9d89-c4510a08ff42"
Empty
{  "type": "https://postmantis.com/problems/unauthorized",  "title": "Unauthorized",  "status": 401,  "detail": "Missing or invalid API key.",  "code": "unauthorized"}
{  "type": "https://postmantis.com/problems/forbidden",  "title": "Forbidden",  "status": 403,  "detail": "The authenticated API key is not allowed to perform this action.",  "code": "forbidden"}
{  "type": "https://postmantis.com/problems/not-found",  "title": "Not found",  "status": 404,  "detail": "Post was not found for the authenticated account.",  "code": "notFound"}
{  "type": "https://postmantis.com/problems/conflict",  "title": "Conflict",  "status": 409,  "detail": "Only drafts can be deleted.",  "code": "conflict"}
{  "error": "Too Many Requests"}