API Reference

LinkedIn API

LinkedIn's Marketing API requires partner program approval, complex URN-based auth, and separate endpoints for each content type. Zernio handles all of that with one POST for text, images, videos, and documents.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect LinkedIn accounts.
  3. 3.
    Start Posting
    Make API calls to post content to LinkedIn.
Post to LinkedIn
JavaScript
const response = await fetch('https://zernio.com/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Excited to announce our new API! ๐Ÿš€\n\nWe just launched...',
    mediaItems: [{ type: 'image', url: 'https://example.com/announcement.png' }],
    platforms: [{
      platform: 'linkedin',
      accountId: 'acc_abc123'
    }],
    publishNow: true
  })
});

const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'

LinkedIn Endpoints

POST/v1/posts

Create or schedule a LinkedIn post (text, image, video, or document)

GET/v1/posts/{id}

Get status and details of a LinkedIn post

DELETE/v1/posts/{id}

Cancel a scheduled LinkedIn post

GET/v1/profiles

List all connected LinkedIn profiles and pages

Media Requirements

TypeFormatMax SizeNotes
ImagePNG, JPEG, GIF8 MB1200x627 recommended
VideoMP45 GB3 sec - 10 min duration
DocumentPDF100 MBUp to 300 pages
Link PreviewURL + metadataTitle: 200 charsAuto-generated rich preview card

Zernio automatically transcodes and optimizes media for LinkedIn's requirements.

API Limits

LinkedIn's API has daily limits based on your app tier. Zernio manages rate limits automatically, queuing posts when limits are approached.

Zernio handles all rate limiting automatically. We queue and retry requests as needed.

Features

  • โœ“Post to personal profiles and company pages
  • โœ“Schedule posts for optimal engagement
  • โœ“Support for images, videos, and documents
  • โœ“Link previews with rich metadata cards
  • โœ“Multi-account management
  • โœ“Webhook notifications for post status
  • โœ“Visibility controls (public/connections)

Response Example

Response
JSON
{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "content": "Excited to announce our new API! ๐Ÿš€\n\nWe just launched...",
    "platforms": [{
      "platform": "linkedin",
      "accountId": { "_id": "acc_abc123", "username": "acme-corp" },
      "status": "published",
      "platformPostId": "urn:li:share:7012345678901234567",
      "platformPostUrl": "https://linkedin.com/feed/update/urn:li:share:7012345678901234567"
    }],
    "publishedAt": "2025-01-10T10:30:00Z",
    "createdAt": "2025-01-10T10:29:55Z"
  },
  "message": "Post published successfully"
}

Start building with LinkedIn API

Free tier available ยท No credit card required ยท 99.97% uptime

SOC 2 CompliantGDPR Compliant