LinkedIn API Guide

How to Schedule LinkedIn Posts via API

Publish text posts, images, videos, carousels, and documents to LinkedIn using the PostFast API. Schedule professional content programmatically.

Last updated: January 2025
Automate your LinkedIn content strategyGet API Key

LinkedIn is the leading professional networking platform with over 1 billion members. Using the PostFast API, you can schedule various content types including text posts, images, videos, carousels, and documents (PDFs, PowerPoint, Word files).

LinkedIn's algorithm favors native content and engagement, making it ideal for thought leadership, company updates, and professional networking. The platform supports rich media including document uploads, which display as swipeable carousels.

Key capabilities when scheduling LinkedIn posts via API include text posts (up to 3,000 characters), image posts (single or carousel), video posts, and document posts (PDF, PPTX, DOCX displayed as carousels).

Code Example

const response = await fetch('https://api.postfa.st/social-posts', {
  method: 'POST',
  headers: {
    'pf-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "posts": [
            {
                "content": "3 lessons I learned from shipping 100 features this year:\n\n1. Start small, iterate fast\n2. User feedback > assumptions\n3. Done is better than perfect\n\nWhat's the most valuable lesson you've learned?\n\n#productmanagement #startup #lessons",
                "mediaItems": [
                    {
                        "key": "image/c3d4e5f6-g7h8-9012-3456-789012cdefgh.jpg",
                        "type": "IMAGE",
                        "sortOrder": 0
                    }
                ],
                "scheduledAt": "2025-01-31T09:00:00.000Z",
                "socialMediaId": "bb1j3944-l8fh-97j0-g372-001211005007"
            }
        ],
        "controls": {}
    })
});

const data = await response.json();

Did You Know?

Character Limit
3,000 characters
LinkedIn posts support up to 3,000 characters, but posts under 1,300 characters perform better
Images
Up to 9 images
Single images or carousels with up to 9 images supported
Video
Up to 10 minutes
Videos can be up to 10 minutes, but 30 seconds to 2 minutes performs best
Documents
PDF, PPTX, DOCX
Documents display as swipeable carousels and are great for educational content

Tips

Post during business hours (Tuesday-Thursday, 8-10 AM) for maximum engagement

Use line breaks and formatting to improve readability of longer posts

Start with a hook in the first two lines (before the "see more" cutoff)

Document posts (PDFs) often outperform images for educational content

Schedule posts, documents, and videos to LinkedIn via API

7-day free trial
Try PostFast Free

Common Pitfalls

Too many hashtags

LinkedIn recommends 3-5 hashtags maximum. More than that can look spammy and reduce reach.

External links in post body

LinkedIn deprioritizes posts with external links. Put links in comments instead, or use document posts.

Mixing media types

You cannot combine images, videos, and documents in a single post. Choose one media type.

Frequently Asked Questions

What document formats does LinkedIn support?

LinkedIn supports PDF, PowerPoint (PPTX), and Word (DOCX) files. PDFs are most common and display as swipeable carousel slides. Maximum 300 pages or 100MB.

Can I schedule to LinkedIn Company Pages?

Yes, connect your LinkedIn Company Page in PostFast, and use that account's socialMediaId. You need admin access to the Company Page.

What's the best time to post on LinkedIn?

Tuesday through Thursday between 8 AM and 10 AM in your audience's timezone typically sees highest engagement. Avoid weekends when professional engagement drops.

Build your LinkedIn presence with programmatic posting

Start Free Trial
7-day free trialCancel anytime