LateLate API
Platforms

LinkedIn API


Quick Start

Post to LinkedIn in under 60 seconds:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Excited to share our latest update! 🚀\n\nWe have been working hard on this feature...",
    "platforms": [
      {"platform": "linkedin", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Excited to share our latest update! 🚀\n\nWe have been working hard on this feature...',
    platforms: [
      { platform: 'linkedin', accountId: 'YOUR_ACCOUNT_ID' }
    ],
    publishNow: true
  })
});

const { post } = await response.json();
console.log('Posted to LinkedIn!', post._id);
import requests

response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Excited to share our latest update! 🚀\n\nWe have been working hard on this feature...',
        'platforms': [
            {'platform': 'linkedin', 'accountId': 'YOUR_ACCOUNT_ID'}
        ],
        'publishNow': True
    }
)

post = response.json()['post']
print(f"Posted to LinkedIn! {post['_id']}")

Image Requirements

PropertyRequirement
Max Images20 per post
FormatsJPEG, PNG, GIF
Max File Size8 MB per image
Recommended1200 × 627 px
Min Dimensions552 × 276 px
Max Dimensions8192 × 8192 px

Aspect Ratios

TypeRatioDimensionsUse Case
Landscape1.91:11200 × 627 pxLink shares, standard
Square1:11080 × 1080 pxEngagement
Portrait1:1.251080 × 1350 pxMobile feed

Multi-Image Posts

LinkedIn supports up to 20 images in carousel-style posts:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Highlights from our team retreat! 🏔️",
    "mediaItems": [
      {"type": "image", "url": "https://example.com/photo1.jpg"},
      {"type": "image", "url": "https://example.com/photo2.jpg"},
      {"type": "image", "url": "https://example.com/photo3.jpg"}
    ],
    "platforms": [
      {"platform": "linkedin", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Highlights from our team retreat! 🏔️',
    mediaItems: [
      { type: 'image', url: 'https://example.com/photo1.jpg' },
      { type: 'image', url: 'https://example.com/photo2.jpg' },
      { type: 'image', url: 'https://example.com/photo3.jpg' }
    ],
    platforms: [
      { platform: 'linkedin', accountId: 'YOUR_ACCOUNT_ID' }
    ],
    publishNow: true
  })
});
response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Highlights from our team retreat! 🏔️',
        'mediaItems': [
            {'type': 'image', 'url': 'https://example.com/photo1.jpg'},
            {'type': 'image', 'url': 'https://example.com/photo2.jpg'},
            {'type': 'image', 'url': 'https://example.com/photo3.jpg'}
        ],
        'platforms': [
            {'platform': 'linkedin', 'accountId': 'YOUR_ACCOUNT_ID'}
        ],
        'publishNow': True
    }
)

Video Requirements

PropertyRequirement
Max Videos1 per post
FormatsMP4, MOV, AVI
Max File Size5 GB
Max Duration15 minutes (personal), 30 min (Pages)
Min Duration3 seconds
Resolution256 × 144 px to 4096 × 2304 px
Aspect Ratio1:2.4 to 2.4:1
Frame Rate10-60 fps
PropertyRecommended
Resolution1920 × 1080 px (1080p)
Aspect Ratio16:9 (landscape) or 1:1 (square)
Frame Rate30 fps
CodecH.264
AudioAAC, 192 kbps
Bitrate10-30 Mbps

Document Posts

LinkedIn uniquely supports PDF documents:

PropertyRequirement
Max Documents1 per post
FormatsPDF, PPT, PPTX, DOC, DOCX
Max File Size100 MB
Max Pages300 pages

Documents display as carousels users can swipe through:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Download our 2024 Industry Report 📊",
    "mediaItems": [
      {"type": "document", "url": "https://example.com/report.pdf"}
    ],
    "platforms": [
      {"platform": "linkedin", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Download our 2024 Industry Report 📊',
    mediaItems: [
      { type: 'document', url: 'https://example.com/report.pdf' }
    ],
    platforms: [
      { platform: 'linkedin', accountId: 'YOUR_ACCOUNT_ID' }
    ],
    publishNow: true
  })
});
response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Download our 2024 Industry Report 📊',
        'mediaItems': [
            {'type': 'document', 'url': 'https://example.com/report.pdf'}
        ],
        'platforms': [
            {'platform': 'linkedin', 'accountId': 'YOUR_ACCOUNT_ID'}
        ],
        'publishNow': True
    }
)

Document Tips

  • First page is the cover/preview
  • Design for mobile viewing
  • Keep text readable (large fonts)
  • Ideal: 10-15 pages for engagement

Multi-Organization Posting

If your connected LinkedIn account manages multiple organizations (company pages), you can post to different organizations from the same account connection.

List Available Organizations

First, retrieve the list of organizations you can post to:

curl -X GET https://getlate.dev/api/v1/accounts/YOUR_ACCOUNT_ID/linkedin-organizations \
  -H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
  'https://getlate.dev/api/v1/accounts/YOUR_ACCOUNT_ID/linkedin-organizations',
  {
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
  }
);

const organizations = await response.json();
console.log('Available organizations:', organizations);
response = requests.get(
    'https://getlate.dev/api/v1/accounts/YOUR_ACCOUNT_ID/linkedin-organizations',
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)

organizations = response.json()
print('Available organizations:', organizations)

Post to Multiple Organizations

Use the same accountId multiple times with different organizationUrn values:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Exciting updates from our organization! 🚀",
    "platforms": [
      {
        "platform": "linkedin",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
          "organizationUrn": "urn:li:organization:111111111"
        }
      },
      {
        "platform": "linkedin",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
          "organizationUrn": "urn:li:organization:222222222"
        }
      }
    ],
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Exciting updates from our organization! 🚀',
    platforms: [
      {
        platform: 'linkedin',
        accountId: 'YOUR_ACCOUNT_ID',
        platformSpecificData: { organizationUrn: 'urn:li:organization:111111111' }
      },
      {
        platform: 'linkedin',
        accountId: 'YOUR_ACCOUNT_ID',
        platformSpecificData: { organizationUrn: 'urn:li:organization:222222222' }
      }
    ],
    publishNow: true
  })
});
response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Exciting updates from our organization! 🚀',
        'platforms': [
            {
                'platform': 'linkedin',
                'accountId': 'YOUR_ACCOUNT_ID',
                'platformSpecificData': {'organizationUrn': 'urn:li:organization:111111111'}
            },
            {
                'platform': 'linkedin',
                'accountId': 'YOUR_ACCOUNT_ID',
                'platformSpecificData': {'organizationUrn': 'urn:li:organization:222222222'}
            }
        ],
        'publishNow': True
    }
)

Note: The organizationUrn format is urn:li:organization: followed by the organization ID.

When posting text with URLs and no media, LinkedIn auto-generates link previews:

{
  "content": "Check out our latest blog post! https://example.com/blog/new-post",
  "platforms": [
    { "platform": "linkedin", "accountId": "acc_123" }
  ]
}

To post a URL without the preview card:

{
  "platforms": [
    {
      "platform": "linkedin",
      "accountId": "acc_123",
      "platformSpecificData": {
        "disableLinkPreview": true
      }
    }
  ]
}

First Comment

Add an automatic first comment:

{
  "platforms": [
    {
      "platform": "linkedin",
      "accountId": "acc_123",
      "platformSpecificData": {
        "firstComment": "What do you think? Share your thoughts below! 👇"
      }
    }
  ]
}

GIF Support

GIFs on LinkedIn:

  • Converted to video format
  • Auto-play in feed (muted)
  • Max recommended: 10 MB
  • Counts as video (1 per post limit)

Common Issues

"Cannot mix media types"

LinkedIn doesn't allow images + videos or images + documents. Choose one type per post.

Document not displaying

  • Check file size (≤100 MB)
  • Ensure valid format (PDF recommended)
  • Password-protected PDFs won't work

Video processing failed

  • Ensure codec is H.264
  • Check duration limits (15 min personal, 30 min Pages)
  • Verify aspect ratio is between 1:2.4 and 2.4:1

The preview uses Open Graph meta tags from the URL. Update the og:image tag on your website.

Inbox

Requires Inbox add-on — $1/social set/month

LinkedIn supports comments only (no DMs via API).

Comments

FeatureSupported
List comments on posts
Reply to comments
Delete comments
Like comments❌ (API restricted)

Limitations

  • No DMs — LinkedIn's messaging API is not available for third-party apps
  • Organization accounts only — Comments require an organization (company page) account type
  • No comment likes — Reactions API is restricted to LinkedIn partners

See Comments API Reference for endpoint details.