Drafts

Update Draft

Update an existing draft. content is required unless you are only trashing the draft. Requires a paid Premium or Lifetime plan.

PATCH /v1/posts/{id} updates an existing draft. It is a partial update in intent — send only the fields you want to change — and the same media rules as create apply: post_type plus media_url or media_urls, with media_mime_type where the type is not obvious from the URL.

The route first fetches the draft to confirm it exists and belongs to the key's account, so a bad id fails cleanly as a 404 instead of creating something or writing to the wrong record.

patch/v1/posts/{id}

Request

  • Base URL: https://api.linkedmash.com
  • URL: https://api.linkedmash.com/v1/posts/{id}
  • Auth: one of:
    • OAuth 2 (client credentials, token URL https://api.linkedmash.com/auth/oauth/token, scopes: content:write)
    • HTTP bearer
    • API key in header linkedmash-api-key

Path parameters

idstring required
Example:drf_8f3a21c9

Identifier of the requested resource.

Request body

contentstring required

The post body text. Required unless only trashing the draft.

titlestring

An optional title for the draft.

formatstring

Post format: text, image, video, article, or poll.

post_typestring

Media type to attach: text, image, video, or pdf. Set this when attaching media.

media_urlstring uri

Public URL of an image, video, or PDF to attach.

media_urlsstring[]

Multiple public media URLs to attach.

media_mime_typestring

MIME type of the attached media (e.g., 'image/png').

Example request

{
  "content": "5 lessons from shipping every week for a year (rewritten hook):",
  "format": "text"
}

Response

Successful response.

statusboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.