Skip to main content

Upload Document

Upload documents (PDF, PPT, PPTX, DOC, DOCX) to LinkedIn as native document posts. Documents are displayed as carousels/viewers on LinkedIn.

Endpoint

POST /api/upload_document

Headers

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication

Parameters

NameTypeRequiredDescription
userStringYesUser identifier (profile name)
platform[]ArrayYesMust be ["linkedin"] - only LinkedIn supports document uploads
documentFile/URLYesThe document file to upload (file upload or URL). Supported formats: PDF, PPT, PPTX, DOC, DOCX
titleStringYesDocument title (displayed on the post)
descriptionStringNoPost commentary/text that appears above the document
visibilityStringNoVisibility setting: "PUBLIC", "CONNECTIONS", "LOGGED_IN", or "CONTAINER". Default: "PUBLIC"
target_linkedin_page_idStringNoLinkedIn organization/page ID to post to a company page instead of personal profile

Document Requirements

RequirementValue
Supported FormatsPDF, PPT, PPTX, DOC, DOCX
Maximum File Size100 MB
Maximum Pages300 pages

Example Request (File Upload)

curl -X POST "https://api.upload-post.com/api/upload_document" \
-H "Authorization: Apikey your-api-key-here" \
-F "user=your_profile" \
-F "platform[]=linkedin" \
-F "document=@/path/to/document.pdf" \
-F "title=My Presentation" \
-F "description=Check out this presentation on our latest product updates!"

Example Request (URL)

curl -X POST "https://api.upload-post.com/api/upload_document" \
-H "Authorization: Apikey your-api-key-here" \
-F "user=your_profile" \
-F "platform[]=linkedin" \
-F "document=https://example.com/document.pdf" \
-F "title=My Presentation" \
-F "description=Check out this presentation!"

Example Request (Company Page)

curl -X POST "https://api.upload-post.com/api/upload_document" \
-H "Authorization: Apikey your-api-key-here" \
-F "user=your_profile" \
-F "platform[]=linkedin" \
-F "document=@/path/to/document.pdf" \
-F "title=Company Update Q4 2024" \
-F "description=Our quarterly report is now available." \
-F "target_linkedin_page_id=12345678" \
-F "visibility=PUBLIC"

Success Response

{
"success": true,
"message": "Document uploaded successfully",
"request_id": "abc123def456",
"results": {
"linkedin": {
"success": true,
"document_urn": "urn:li:document:1234567890",
"post_id": "urn:li:activity:7654321098765432",
"url": "https://www.linkedin.com/feed/update/urn:li:activity:7654321098765432/",
"platform": "linkedin",
"content_type": "document",
"file_size": 1048576,
"filename": "document.pdf"
}
}
}

Error Response

{
"success": false,
"message": "Document upload failed: Your LinkedIn session has expired. Please reconnect your LinkedIn account at app.upload-post.com/manage-users.",
"request_id": "abc123def456",
"results": {
"linkedin": {
"success": false,
"error": "Your LinkedIn session has expired. Please reconnect your LinkedIn account at app.upload-post.com/manage-users."
}
}
}

How Documents Appear on LinkedIn

When you upload a document:

  1. Native Viewer: LinkedIn displays the document in a native carousel/viewer format
  2. Page Navigation: Users can swipe or click through pages
  3. Preview: LinkedIn generates thumbnail previews for each page
  4. Download: Depending on visibility settings, users may be able to download the document

Platform Limitations

PlatformDocument Support
LinkedInYes (native carousel/viewer)
FacebookNo
InstagramNo
TikTokNo
X (Twitter)No
YouTubeNo
PinterestNo
ThreadsNo
BlueskyNo
RedditNo

Notes

  • Document processing may take a few seconds on LinkedIn's side before the post becomes fully visible
  • The document title appears as the post's media title
  • The description/commentary appears as the post text above the document
  • For company pages, ensure the authenticated LinkedIn account has admin access to the page
  • LinkedIn may compress or optimize documents for viewing