Delete Draft
Delete a post draft by its id. Requires a paid Creator or Lifetime plan.
DELETE /v1/posts/{id} removes a draft. The delete is soft: the draft is moved to trash rather than erased, which is why the response is a plain { id, deleted: true } rather than the deleted record.
As with update, the draft is fetched first to confirm it exists and belongs to the account, so deleting an unknown id is a clean 404.
Example request
Authenticate with a bearer token in the Authorization header. Create a key on the API page in your LinkedMash settings and export it as LINKEDMASH_API_KEY before running this.
curl -X DELETE "https://api.linkedmash.com/v1/posts/drf_8f3a21c9" \
-H "Authorization: Bearer $LINKEDMASH_API_KEY"Path parameters
The id of the draft to delete.
Header parameters
Your secret API key as a Bearer token.
Response
{
"status": true,
"data": {
"id": "drf_8f3a21c9",
"deleted": true
}
}Response fields
Every response is wrapped in the same envelope: a status flag and a data payload, with meta present where there is pagination or a plan limit to report.
true on success. Every LinkedMash API response carries this envelope flag alongside data, so a client can branch on it without re-reading the HTTP status.
The draft id that was trashed, echoed back.
true on success. The delete is soft: the draft is flagged as trashed and can still be restored in the Studio, which is why the deleted record itself is not returned.
Discarding a draft safely
Order matters when the draft is queued: trashing it does not stop the publish.
Check for a schedule
GET /v1/posts/{id} and look at status, or search GET /v1/queue for an entry pointing at this draft. A status of scheduled means there is a queue entry to deal with.
Cancel the queue entry first
DELETE /v1/queue/{scheduleId} removes the scheduled publish. This is the step that actually prevents the post going out.
Then trash the draft
DELETE /v1/posts/{id} flags it as trashed. It disappears from GET /v1/posts and stays recoverable from the Studio.
Treat a repeat 404 as already-done
The second delete of the same id returns 404 because the draft is no longer in the active set. That makes the call retry-safe as long as your client does not surface 404 as a failure.
Behaviour and limits
Requires a Creator or Lifetime plan
Everything under /v1/posts, /v1/queue, /v1/schedule, /v1/media and /v1/analytics sits behind one middleware that checks for an unlocked Studio, so a Reader-plan or free key gets 402 with code SUBSCRIPTION_REQUIRED before the handler runs. Bookmark and label reads are on a separate router and are not affected by this gate.
Soft delete, so it is recoverable in the app
The draft is flagged as trashed, not destroyed. It stops appearing in GET /v1/posts, and it can still be restored from the Studio.
Deleting does not cancel a schedule
If the draft has a queue entry, cancel it with DELETE /v1/queue/{scheduleId} first. Trashing the draft alone is not the way to stop a scheduled publish.
Repeat deletes 404
The second delete of the same id finds nothing in the active set and answers 404, which makes the call safe to retry only if you treat 404 as already-done.
Errors
Failures carry the same envelope as a success, with the reason in message and a stable machine-readable code where the status alone is ambiguous — several distinct conditions share a 402.