Drafts

Create Draft

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.

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

Request body

contentstring required

The post body text.

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:",
  "title": "Weekly shipping lessons",
  "format": "text"
}

Response

Successful response.

statusboolean required

Changes

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