Skip to main content

How do I post to LinkedIn with an API?

Send a request to Upload-Post with platform[]=linkedin: POST https://api.upload-post.com/api/upload for video, POST /api/upload_photos for images, POST /api/upload_text for text-only posts and POST /api/upload_document for native PDF/PPT/DOC document posts. Upload-Post uses its own approved LinkedIn app, so you skip the LinkedIn developer-program application and the Marketing API access request entirely. Connect the LinkedIn account once via OAuth, then post to the member profile or to any company page they administer.

Steps

  1. Create an account at upload-post.com and generate an API key under API Keys (Authentication).
  2. Connect LinkedIn at Manage Users (or via a white-label JWT link for your users).
  3. Post a video:
curl \
-H 'Authorization: Apikey your-api-key-here' \
-F 'video=@/path/to/your/video.mp4' \
-F 'title="Your Video Title"' \
-F 'description="Post commentary shown above the video"' \
-F 'user="test"' \
-F 'platform[]=linkedin' \
-X POST https://api.upload-post.com/api/upload

Post as a company page

By default posts go to the member's personal profile. To post as an organization, pass target_linkedin_page_id with the page ID from Get LinkedIn Pages:

curl \
-H 'Authorization: Apikey your-api-key-here' \
-F 'user="test"' \
-F 'platform[]=linkedin' \
-F 'title="Our company is launching a new product!"' \
-F 'target_linkedin_page_id="your_linkedin_page_id_here"' \
-X POST https://api.upload-post.com/api/upload_text

Text posts and documents

  • Text-only posts (optionally with a link preview via linkedin_link_url): Upload Text.
  • Documents (PDF, PPT/PPTX, DOC/DOCX rendered as a native LinkedIn carousel viewer): Upload Document, aka POST /api/upload_document.

Useful LinkedIn parameters

Full list in the Upload Video reference:

ParameterWhat it doesDefault
linkedin_titleLinkedIn-specific title (falls back to title)title
linkedin_description / descriptionSent as the LinkedIn commentarytitle
visibilityPUBLIC, CONNECTIONS, LOGGED_IN, CONTAINERPUBLIC
target_linkedin_page_idPost as an organization pagenone
first_comment / linkedin_first_commentAuto-post a first commentnone
scheduled_dateISO-8601 date to schedule the postnone

Limits and gotchas

  • Daily cap: 150 LinkedIn posts per connected account per rolling 24 h (upload limits).
  • Video specs: up to 5 GB / 10 min. See Video Requirements.
  • Token expiry: LinkedIn tokens last ~60 days and auto-refresh with regular use (FAQ).