---
title: "Create Draft"
method: POST
path: "/v1/posts"
tags: ["Drafts"]
---

# Create Draft

`POST /v1/posts`

## Request

- Base URL: `https://api.linkedmash.com`
- URL: `https://api.linkedmash.com/v1/posts`
- 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`

Create a new post draft. Attach media by setting post_type and one of media_url or media_urls. Requires a paid Premium or Lifetime plan.

POST /v1/posts creates a LinkedIn post draft in LinkedMash. content is the only required field; everything else — title, format, and the media fields — is optional. The draft is created unscheduled, so nothing is published by this call, and the returned id is what you pass to the schedule, update and delete endpoints.

To attach media, upload or re-host it first with POST /v1/media/upload and pass the returned URL as media_url (or several as media_urls), together with post_type and media_mime_type. Passing a LinkedIn-hosted or short-lived URL directly is the usual cause of a draft that publishes without its image.

## Request body

- object
  - `content` string, required: The post body text.
  - `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 `201`

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. content was missing or empty.
- `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.
- `500`: Server Error. Something failed on our side. The body carries message "Failed to create 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)
