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.
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.
POST https://eranol.com/api/v1/social/linkedin/publish
Headers: x-api-key: <your key> and Content-Type: application/json.
| Field | Type | Required | Notes |
|---|---|---|---|
text | string | Yes | Post commentary. Max 3,000 characters. Line breaks (\n) are preserved |
media_urls | string[] | No | Images, a video or a PDF — see Media rules. Omit for a text-only or link post |
title | string | No | Title shown on a PDF document post (max 400 characters). Defaults to the file name |
article_url | string | No | Share a link instead of media. Must be a valid http(s) URL. Cannot be combined with media_urls |
article_title | string | No | Title for the shared link |
article_description | string | No | Description for the shared link |
visibility | string | No | PUBLIC (default) or CONNECTIONS |
scheduled_for | string | No | ISO 8601 timestamp in the future. Queues the post — see Scheduling |
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:
| Kind | Extensions | Count per post |
|---|---|---|
| Images | .jpg .jpeg .png .gif | 1 to 9 |
| Video | .mp4 .mov .m4v | exactly 1 |
.pdf | exactly 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.
@ text are plain text — mentions are not turned into live links through this APIarticle_url must be a public http(s) URLarticle_title and article_description override what LinkedIn would scrape from the page| Spec | Value |
|---|---|
| Formats | JPG, PNG, GIF |
| Count | 1 to 9 per post (2 or more are shown as a multi-image post) |
| File size | Keep each image under 5 MB (LinkedIn's practical limit; GIFs under 5 MB as well) |
| Max resolution | 36,152,320 pixels total (e.g. about 6,000 × 6,000) |
| Min width | 552 px recommended |
Recommended sizes (LinkedIn crops to these ratios in the feed):
| Layout | Size | Ratio |
|---|---|---|
| Landscape (link-preview style) | 1200 × 627 px | 1.91:1 |
| Square | 1080 × 1080 px | 1:1 |
| Portrait | 1080 × 1350 px | 4:5 |
Animated GIFs: up to about 250 frames and the same pixel limit; only the first frame shows in some previews.
| Spec | Value |
|---|---|
| Formats | MP4 (recommended), MOV, M4V |
| Count | 1 per post |
| File size | 75 KB minimum, 500 MB maximum |
| Duration | 3 seconds to 30 minutes (feed autoplay performs best under 90 seconds) |
| Resolution | 256 × 144 up to 4096 × 2304 |
| Aspect ratio | 1:2.4 to 2.4:1 |
| Frame rate | 10 to 60 fps |
| Codecs | H.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.
| Spec | Value |
|---|---|
| Format | |
| Count | 1 per post |
| File size | 100 MB maximum (keep under 20 MB for fast loading) |
| Pages | 300 maximum (carousels of 5–15 pages perform best) |
| Page size | Any; landscape 16:9 (e.g. 1920 × 1080) or square/portrait 4:5 read best on mobile |
| Title | title 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.
{
"text": "We just crossed 10,000 users.\n\nThank you to everyone who built with us this year.",
"visibility": "PUBLIC"
}
{
"text": "Our new dashboard is live.",
"media_urls": ["https://www.eranol.com/uploads/dashboard-1200x627.png"]
}
{
"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"
]
}
{
"text": "60-second product demo 🎬",
"media_urls": ["https://www.eranol.com/uploads/demo-1920x1080.mp4"]
}
{
"text": "Our Q3 report — swipe through below.",
"media_urls": ["https://www.eranol.com/uploads/q3-report.pdf"],
"title": "Q3 Report"
}
{
"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."
}
{
"text": "A quick update for my network.",
"visibility": "CONNECTIONS"
}
{
"text": "Announcing this next week 📅",
"media_urls": ["https://www.eranol.com/uploads/announcement.png"],
"scheduled_for": "2026-09-01T15:00:00Z"
}
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"]}'
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.
{
"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.
{
"success": true,
"scheduled": true,
"scheduled_post_id": "a1b2c3d4-...",
"scheduled_for": "2026-09-01T15:00:00.000Z"
}
| Status | Meaning |
|---|---|
400 | Missing/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 |
401 | Missing or invalid API key, or the LinkedIn session expired — reconnect your account in the dashboard |
402 | Insufficient credits |
500 | Internal server error — try again or contact support |
| other | LinkedIn 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 |
| Message | Fix |
|---|---|
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 |