Eranol LogoEranol
BlogCommunityDocumentationPricingSign In

General

OverviewGet Started

MCP Connectors

ClaudeChatGPT
Instagram PublishInstagram Scheduled — CancelInstagram Scheduled — ListLinkedIn Cancel ScheduledLinkedIn PublishLinkedIn Scheduled PostsLinkedIn StatusTikTokTikTok Scheduled — CancelTikTok Scheduled — ListTikTok StatusX PublishX Scheduled — CancelX Scheduled — ListYouTube PublishYouTube Scheduled — CancelYouTube Scheduled — List
Add IntroAdd OutroAudio to VideoBackground AudioCaptions ApiComposeConcatConvert a video file to MP4Convert Audio to Mp3Convert Audio to wavConvert to JPGConvert to WebMConvert to WebPCutDenoiseEnhanceExtract audio track from a videoExtract images from a videoGenerate a GIF from a videoHighlightsImage TestImages to PDFMedia UploadMergeNotifyOverlayProgress BarReframeRemove SilenceThumbnailTrimVerifyWatermarkZoom
DeleteImage StatusStatusFFmpeg Results

Need help?

Contact Support

LinkedIn Publish

POST

Publish a post to the connected LinkedIn member profile. text is required (max 3000 chars). Attach media via media_urls (eranol.com URLs): up to 9 images, OR one video (mp4/mov), OR one PDF document (shown as a swipeable document post; optional title). Media types cannot be mixed. Alternatively set article_url (with optional article_title / article_description) to share a link. visibility is PUBLIC (default) or CONNECTIONS. Set scheduled_for to an ISO timestamp to queue the post instead of publishing immediately.

Overview

Publishes a post to the LinkedIn member profile connected to your eranol.com account. Supports text-only posts, link (article) shares, image posts (single or multi-image), video posts and PDF document posts, and can publish immediately or schedule for later.

Before this endpoint can be used, the account must connect LinkedIn via Dashboard → Social Media → Connect. Calls for an account with no active LinkedIn connection return 400. If the connection's token has expired, the call returns 401 — reconnect from the dashboard.

Endpoint

POST https://eranol.com/api/v1/social/linkedin/publish

Headers: x-api-key: <your key> and Content-Type: application/json.

Request body

FieldTypeRequiredNotes
textstringYesPost commentary. Max 3,000 characters. Line breaks (\n) are preserved
media_urlsstring[]NoImages, a video or a PDF — see Media rules. Omit for a text-only or link post
titlestringNoTitle shown on a PDF document post (max 400 characters). Defaults to the file name
article_urlstringNoShare a link instead of media. Must be a valid http(s) URL. Cannot be combined with media_urls
article_titlestringNoTitle for the shared link
article_descriptionstringNoDescription for the shared link
visibilitystringNoPUBLIC (default) or CONNECTIONS
scheduled_forstringNoISO 8601 timestamp in the future. Queues the post — see Scheduling

Media rules

media_urls must point to files hosted on eranol.com / www.eranol.com (for example ffmpeg job results or converted files) or to files in your own Media Library. Any other URL is rejected with 400. The file type is detected from the URL's extension (query strings are ignored), so the URL must end in a supported extension.

Choose one kind per post — kinds cannot be mixed:

KindExtensionsCount per post
Images.jpg .jpeg .png .gif1 to 9
Video.mp4 .mov .m4vexactly 1
PDF.pdfexactly 1 — shown as a swipeable document

Our API validates the type, count and URL host. File size, dimensions, duration and page count are enforced by LinkedIn when the file is uploaded — a file outside these limits fails with a LinkedIn error message in error (the attempt is recorded as failed). The specs below are LinkedIn's published limits; check them before publishing.

Specs by post type

Text only

  • Up to 3,000 characters (LinkedIn shows roughly the first 210 characters before "…see more", so put the hook first)
  • Hashtags and @ text are plain text — mentions are not turned into live links through this API

Link (article) share

  • article_url must be a public http(s) URL
  • article_title and article_description override what LinkedIn would scrape from the page
  • Cannot be combined with images, video or PDF

Images

SpecValue
FormatsJPG, PNG, GIF
Count1 to 9 per post (2 or more are shown as a multi-image post)
File sizeKeep each image under 5 MB (LinkedIn's practical limit; GIFs under 5 MB as well)
Max resolution36,152,320 pixels total (e.g. about 6,000 × 6,000)
Min width552 px recommended

Recommended sizes (LinkedIn crops to these ratios in the feed):

LayoutSizeRatio
Landscape (link-preview style)1200 × 627 px1.91:1
Square1080 × 1080 px1:1
Portrait1080 × 1350 px4:5

Animated GIFs: up to about 250 frames and the same pixel limit; only the first frame shows in some previews.

Video

SpecValue
FormatsMP4 (recommended), MOV, M4V
Count1 per post
File size75 KB minimum, 500 MB maximum
Duration3 seconds to 30 minutes (feed autoplay performs best under 90 seconds)
Resolution256 × 144 up to 4096 × 2304
Aspect ratio1:2.4 to 2.4:1
Frame rate10 to 60 fps
CodecsH.264 video, AAC audio recommended

Recommended sizes: 1920 × 1080 (16:9 landscape), 1080 × 1080 (square) or 1080 × 1920 (9:16 vertical, mobile only).

Need to convert or resize first? Use the Convert to MP4 and Reframe APIs and pass the resulting eranol.com result URL as media_urls.

PDF document

SpecValue
FormatPDF
Count1 per post
File size100 MB maximum (keep under 20 MB for fast loading)
Pages300 maximum (carousels of 5–15 pages perform best)
Page sizeAny; landscape 16:9 (e.g. 1920 × 1080) or square/portrait 4:5 read best on mobile
Titletitle field (max 400 characters); defaults to the file name

Tip: build a PDF from images with the Images to PDF API (one image per page), then pass its result URL here.

Example — text only

{
  "text": "We just crossed 10,000 users.\n\nThank you to everyone who built with us this year.",
  "visibility": "PUBLIC"
}

Example — single image

{
  "text": "Our new dashboard is live.",
  "media_urls": ["https://www.eranol.com/uploads/dashboard-1200x627.png"]
}

Example — multi-image (up to 9)

{
  "text": "Behind the scenes at the launch.",
  "media_urls": [
    "https://www.eranol.com/uploads/photo-1.jpg",
    "https://www.eranol.com/uploads/photo-2.jpg",
    "https://www.eranol.com/uploads/photo-3.jpg"
  ]
}

Example — video

{
  "text": "60-second product demo 🎬",
  "media_urls": ["https://www.eranol.com/uploads/demo-1920x1080.mp4"]
}

Example — PDF document

{
  "text": "Our Q3 report — swipe through below.",
  "media_urls": ["https://www.eranol.com/uploads/q3-report.pdf"],
  "title": "Q3 Report"
}

Example — link share

{
  "text": "New on the blog:",
  "article_url": "https://www.eranol.com/blog/launch",
  "article_title": "We just launched",
  "article_description": "Everything that shipped this month."
}

Example — visible to connections only

{
  "text": "A quick update for my network.",
  "visibility": "CONNECTIONS"
}

Example — scheduled

{
  "text": "Announcing this next week 📅",
  "media_urls": ["https://www.eranol.com/uploads/announcement.png"],
  "scheduled_for": "2026-09-01T15:00:00Z"
}

Example — cURL

curl -X POST https://eranol.com/api/v1/social/linkedin/publish \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello LinkedIn","media_urls":["https://www.eranol.com/uploads/image.jpg"]}'

Scheduling

Pass scheduled_for as a future ISO timestamp to queue the post. Scheduled posts return 202 Accepted with a different response shape and are published automatically by a background dispatcher at the scheduled time. Media is fetched and uploaded to LinkedIn when the post fires, so keep the files available until then. Manage queued posts with the scheduled posts list and cancel endpoints.

Example response

{
  "success": true,
  "post_urn": "urn:li:share:1234567890",
  "post_url": "https://www.linkedin.com/feed/update/urn:li:share:1234567890",
  "log_id": "b7e1c2a4-..."
}

Pass log_id to the status endpoint to look up the recorded outcome.

Example response — scheduled

{
  "success": true,
  "scheduled": true,
  "scheduled_post_id": "a1b2c3d4-...",
  "scheduled_for": "2026-09-01T15:00:00.000Z"
}

Errors

StatusMeaning
400Missing/empty text; text over 3,000 characters; invalid visibility; media_urls not an array or not on eranol.com / your Media Library; unsupported extension; mixed media kinds; more than 9 images, or more than one video / PDF; article_url combined with media_urls or not a valid URL; invalid or past scheduled_for; or no connected LinkedIn account
401Missing or invalid API key, or the LinkedIn session expired — reconnect your account in the dashboard
402Insufficient credits
500Internal server error — try again or contact support
otherLinkedIn rejected the request (for example a file over its size, resolution, duration or page limit), or a source media file couldn't be fetched. The message is returned in error and the attempt is recorded as failed

Common failure messages

MessageFix
Unsupported media type. Use JPG/PNG/GIF images, an MP4/MOV video, or a PDF.Make sure the URL ends in a supported extension
You cannot mix images, video and PDF in one LinkedIn post.Send one kind of media per post
You can attach up to 9 images.Split into several posts
Source media is not accessible (HTTP …).The file URL must be publicly reachable or in your Media Library