---
title: "Update Draft"
method: PATCH
path: "/v1/posts/{id}"
tags: ["Drafts"]
---

# Update Draft

`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`

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.

## Path parameters

- `id` string, required

## Request body

- object
  - `content` string, required: The post body text. Required unless only trashing the draft.
  - `title` string: An optional title for the draft.
  - `format` string: Post format: text, image, video, article, or poll.
  - `post_type` string: Media type to attach: text, image, video, or pdf. Set this when attaching media.
  - `media_url` string, uri: Public URL of an image, video, or PDF to attach.
  - `media_urls` string[]: Multiple public media URLs to attach.
  - `media_mime_type` string: MIME type of the attached media (e.g., 'image/png').

## Response `200`

Successful response.

- object
  - `status` boolean, required
  - `data` object, required
    - `id` string, required
    - `content` string, required
    - `title` string, required
    - `format` string, required
    - `status` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: Bad Request. The draft store rejected the payload — most often an empty content field.
- `401`: Unauthorized. 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.
- `402`: Payment Required. Returned with code SUBSCRIPTION_REQUIRED. The content API requires a Premium or Lifetime plan; Reader and free accounts get this on every /v1/posts, /v1/queue, /v1/schedule, /v1/media and /v1/analytics call.
- `404`: Not Found. No draft with that id on this account.
- `500`: Server Error. Something failed on our side. The body carries message "Failed to update post". Retry once; if it persists the request is not the problem.

---

[API](https://skmtc.dev/linkedmash/apis/linkedmash-api.md) · [All operations](https://skmtc.dev/linkedmash/apis/linkedmash-api/llms.txt) · [OpenAPI document](https://skmtc.dev/linkedmash/apis/linkedmash-api/revisions/eef45d6fbea3?raw)
