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
| Name | Value | Description |
|---|---|---|
| Authorization | Apikey your-api-key-here | Your API key for authentication |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| user | String | Yes | User identifier (profile name) |
| platform[] | Array | Yes | Must be ["linkedin"] - only LinkedIn supports document uploads |
| document | File/URL | Yes | The document file to upload (file upload or URL). Supported formats: PDF, PPT, PPTX, DOC, DOCX |
| title | String | Yes | Document title (displayed on the post) |
| description | String | No | Post commentary/text that appears above the document |
| visibility | String | No | Visibility setting: "PUBLIC", "CONNECTIONS", "LOGGED_IN", or "CONTAINER". Default: "PUBLIC" |
| target_linkedin_page_id | String | No | LinkedIn organization/page ID to post to a company page instead of personal profile |
Document Requirements
| Requirement | Value |
|---|---|
| Supported Formats | PDF, PPT, PPTX, DOC, DOCX |
| Maximum File Size | 100 MB |
| Maximum Pages | 300 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:
- Native Viewer: LinkedIn displays the document in a native carousel/viewer format
- Page Navigation: Users can swipe or click through pages
- Preview: LinkedIn generates thumbnail previews for each page
- Download: Depending on visibility settings, users may be able to download the document
Platform Limitations
| Platform | Document Support |
|---|---|
| Yes (native carousel/viewer) | |
| No | |
| No | |
| TikTok | No |
| X (Twitter) | No |
| YouTube | No |
| No | |
| Threads | No |
| Bluesky | No |
| No |
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
Related Endpoints
- Upload Video - Upload videos to multiple platforms
- Upload Photo - Upload images to multiple platforms
- Upload Text - Post text-only content
- Get LinkedIn Pages - List available LinkedIn pages for your account