API Docs/Reference/Get Draft
API Reference

Get Draft

Fetch a single post draft by its id. Requires a paid Creator or Lifetime plan.

GEThttps://api.linkedmash.com/v1/posts/{id}

GET /v1/posts/{id} returns a single draft by id, including its content, title, format, status, any attached media and its timestamps. It is the read half of the update loop: fetch, modify, PATCH back.

The id is the value returned as data.id when the draft was created, and the same id used by the schedule and delete routes.

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
curl "https://api.linkedmash.com/v1/posts/drf_8f3a21c9" \
  -H "Authorization: Bearer $LINKEDMASH_API_KEY"

Path parameters

idstringRequired

The id of the draft to fetch.

Header parameters

AuthorizationstringRequired

Your secret API key as a Bearer token.

Response

{
  "status": true,
  "data": {
    "id": "drf_8f3a21c9",
    "content": "5 lessons from shipping every week for a year:",
    "title": "Weekly shipping lessons",
    "format": "text",
    "status": "draft",
    "created_at": "2026-06-22T09:14:02.118Z",
    "updated_at": "2026-06-22T09:14:02.118Z"
  }
}

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.

statusboolean

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.

data.idstring

Draft identifier. Pass it to GET, PATCH and DELETE /v1/posts/{id} and to the schedule route.

data.contentstring | object

The post body. Drafts written in the Studio editor can store this as an object with a text field rather than a bare string — handle both.

data.titlestring

Internal working title. It is never published to LinkedIn; it exists so drafts are findable.

data.formatstring

Composition format, e.g. text or carousel.

data.statusstring

One of draft, scheduled or published.

data.created_atstring

ISO-8601 creation timestamp.

data.updated_atstring

ISO-8601 timestamp of the last edit.

The read-modify-write loop

Editing a draft safely is three calls, and skipping the first is how edits overwrite each other.

1

Read the current state

Fetch the draft before editing. The user may have changed it in the Studio since you last saw it, and PATCH has no conflict detection to catch that for you.

2

Normalise content

content is a string on API-created drafts and can be an object with a text field on Studio-created ones. Normalise on read so the rest of your code sees one shape.

3

Send only what changes

PATCH /v1/posts/{id} with just the changed fields. Sending the whole object back is what turns an unrelated concurrent edit into a silent revert.

4

Preserve media explicitly

media_urls replaces rather than appends. If the draft has attachments and you are not changing them, leave the field out of the PATCH entirely.

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.

404 covers both missing and not-yours

Every call is scoped to the key's account, so a draft belonging to another account is indistinguishable from one that does not exist. Both answer 404.

content may be a string or an object

Drafts written through the Studio editor can store content as an object with a text field rather than a bare string. Handle both if you read this field directly — the publish path in the schedule endpoint does exactly that.

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.

Status
Meaning
401Unauthorized
The Authorization header is missing or the key is not a valid LinkedMash API key. Create or rotate keys on the API page in your LinkedMash settings.
402Payment Required
Returned with code SUBSCRIPTION_REQUIRED. The content API requires a Creator or Lifetime plan; Reader and free accounts get this on every /v1/posts, /v1/queue, /v1/schedule, /v1/media and /v1/analytics call.
404Not Found
No draft with that id on this account.
500Server Error
Something failed on our side. The body carries message "Failed to get post". Retry once; if it persists the request is not the problem.