# LinkedIn API with PDF carousels and mentions

Publish LinkedIn profile and Company Page posts, PDF document carousels, polls, @mentions and photo first comments via one REST API.

LinkedIn’s Community Management API requires strict partner approval, URN resolution for every mention, separate asset registration for PDFs and videos, and manual markup escaping. PostSyncer delivers personal profile and Page publishing, PDF carousels, polls, mention lookup and analytics in one REST API.

**REST API:** https://postsyncer.com/api/v1 · **MCP server:** https://postsyncer.com/mcp · **Docs:** https://postsyncer.com/docs/platforms/linkedin

## Example LinkedIn request

```bash
curl -X POST "https://postsyncer.com/api/v1/posts" \
  -H "Authorization: Bearer $POSTSYNCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 4815,
    "schedule_type": "schedule",
    "schedule_for": {
      "date": "2026-12-08",
      "time": "08:30",
      "timezone": "America/Los_Angeles"
    },
    "content": [
      {
        "text": "Our Q2 supply chain report is out, built with @[Copperleaf Mills](urn:li:organization:90412577)."
      },
      {
        "text": "Full benchmark figures and methodology: haldencoffee.example/report",
        "is_first_comment": true,
        "first_comment_delay": 1
      }
    ],
    "accounts": [
      {
        "id": 16236,
        "settings": {
          "visibility": "PUBLIC"
        }
      }
    ]
  }'
```

```json
{
  "id": 81418,
  "status": "SCHEDULED",
  "platforms": [
    {
      "account_id": 16236,
      "platform": "linkedin",
      "status": "PENDING",
      "settings": {
        "visibility": "PUBLIC"
      }
    }
  ],
  "skipped_accounts": [],
  "needs_media": []
}
```

## Quick start

1. **Connect LinkedIn profiles or Company Pages.** Authorize personal profiles and organization Pages in PostSyncer or send executives a 7-day hosted OAuth link via POST /accounts/connect-links.

2. **Resolve @mentions and attach media or documents.** Look up ready-to-paste tags with GET /accounts/{id}/linkedin/mentions?q= (a name, or a company’s LinkedIn link) and pass text, up to 10 photos, an MP4 video, a PDF/PPTX document or a poll to POST /posts.

3. **Answer comments and monitor B2B metrics.** Read synced LinkedIn comments, reply with text or a photo via /comments, and track impressions, clicks, shares, saves and profile_visits via /analytics.

## LinkedIn endpoints

- `POST /api/v1/posts` (`posts:create / schedule / publish`): Publish text, 10-photo posts, MP4 videos, swipeable PDF/PPTX documents, link cards, polls and first comments.

- `GET /api/v1/accounts/{id}/linkedin/mentions` (`accounts:read`): Find people (tagged before, teammates, Page followers) and companies (by LinkedIn link or its short name) as ready-to-paste @[Name](urn:li:...) tags.

- `DELETE /api/v1/posts/{id}` (`posts:delete`): Cancel scheduled posts or request LinkedIn to delete a published profile or Page post.

- `GET /api/v1/comments` (`comments:read`): Fetch LinkedIn comments read on schedule or on demand via POST /comments/sync.

- `POST /api/v1/comments` (`comments:create`): Reply to a LinkedIn comment as the profile or Page, optionally with one photo.

- `GET /api/v1/analytics/posts/{id}` (`analytics:read`): Read impressions, likes, comments, shares, saves, clicks, reach, views and profile_visits.

## LinkedIn media and text specs

- **Photos** (JPG, PNG, GIF, WebP, Up to 10 · 5 MB each): Cannot be mixed with a video or document in the same LinkedIn post.

- **Video** (MP4 only, 1 video · 3s–30 min · up to 500 MB): MOV and WebM are refused with 422 on LinkedIn; supply MP4 or override via settings.media.

- **Document carousel** (PDF, DOC, DOCX, PPT, PPTX, 1 document alone): Must be the first and only file; renders as LinkedIn’s swipeable slide deck. Other cross-posted networks skip it.

- **Polls** (Question + 2–4 options, 140 char Q · 30 char options): Durations: 1440 (1d), 4320 (3d), 10080 (1w) or 20160 (2w) minutes. Cannot share post with media or link.

- **Text & mentions** (Plain text + URN mentions, 3,000 characters): Longer text trims cleanly without slicing through an @[Name](urn:li:...) mention tag.

- **platform key:** linkedin

- **Media required:** No — text-only posts, link articles and polls publish without media.

- **First comment:** Supported with text plus up to 1 photo (no video or document); mentions render as plain names.

- **Deleting posts:** Supported — DELETE /posts/{id} requests LinkedIn to delete the live post.

- **Comments API:** Synced on schedule; reply (+1 photo) and delete supported. LinkedIn cannot hide comments (returns 422).

- **Analytics metrics:** impressions, likes, comments, shares, saves, clicks, reach, views and profile_visits.

## LinkedIn capabilities and settings

LinkedIn’s highest-performing B2B formats — document carousels, native company mentions, executive polls and link-in-first-comment posts — work directly through JSON.

- **Real LinkedIn @mentions without URN guesswork.** Plain @handles do not notify anyone on LinkedIn. Query GET /accounts/{id}/linkedin/mentions?q= with a company’s LinkedIn link or short name, or the name of a teammate, a Page follower or someone you tagged before, to get the exact @[Name](urn:li:...) tag, and cross-post safely as other networks automatically receive the plain name.

- **Automatic LinkedIn markup escaping.** LinkedIn’s commentary parser treats characters like parentheses, brackets and asterisks as syntax and silently truncates broken posts. PostSyncer escapes reserved characters automatically so your copy renders verbatim.

- **Swipeable PDF & slide document posts.** Upload a PDF, DOC, DOCX, PPT or PPTX document and publish native multi-page LinkedIn carousels without implementing LinkedIn’s multi-step document upload API.

- **Polls on profiles and Company Pages.** Create 1-day, 3-day, 1-week or 2-week LinkedIn polls via settings.poll with automatic 422 checks on question length, duplicate choices and media conflicts.

- **First comments with an image.** Keep outbound links out of the main post body by scheduling an is_first_comment item delayed by first_comment_delay minutes, optionally paired with a supporting chart or graphic.

- **Full B2B post & Page analytics.** Retrieve impressions, clicks, reach, views, saves, shares and profile_visits per post, with clear analytics_unavailable.reason: linkedin_reconnect guidance if an older profile needs refreshed permissions.

- `visibility` ("PUBLIC" | "CONNECTIONS"): Controls whether everyone on LinkedIn or only 1st-degree connections can view the post.

- `title` (string (cut at 3,000 chars)): LinkedIn-specific post copy overriding content[0].text; supports @[Name](urn:li:...) mentions.

- `link` (string (URL)): Attaches an article link card when the post has no media. A link on a post with a poll is refused with 422.

- `poll` (object): Adds a poll with enabled, question (≤ 140 chars), options (2–4 unique choices ≤ 30 chars) and duration_minutes.

- `media` (number[]): Overrides shared media with LinkedIn-specific media library IDs (for example an MP4 when cross-posting a MOV).

## Why teams skip LinkedIn’s Community Management API approval queue

Publishing to LinkedIn Company Pages, reading Page comments, looking up organization URNs and fetching analytics sit behind LinkedIn’s Community Management API — a restricted product with multi-week reviews, annual re-verification and separate asset registration APIs for images, videos and PDF documents.

With PostSyncer, your backend talks to one stable REST endpoint for both personal profiles and Company Pages. You avoid juggling LinkedIn API version headers (YYYYMM) that sunset every year, and you get consistent error responses across every media and poll rule.

## Getting LinkedIn @mentions and special characters right

LinkedIn’s Little Text Format breaks whenever unescaped symbols like |, (, ), [ or ] appear next to mentions or URLs. PostSyncer escapes reserved markup characters automatically before delivery while preserving valid @[Name](urn:li:person:ID), @[Name](urn:li:organization:ID) and @[Name](urn:li:organizationBrand:ID) tags.

When cross-posting a LinkedIn announcement to X, Bluesky or Facebook in the same POST /posts request, PostSyncer strips the URN wrapper on the other networks so they publish the clean name instead of raw URN syntax.

## MP4 requirements, document posts and comment moderation rules

PostSyncer sends LinkedIn MP4 video files up to 500 MB and 30 minutes, and refuses MOV and WebM uploads for LinkedIn with HTTP 422. If your pipeline publishes a MOV to TikTok and Instagram alongside LinkedIn, pass an MP4 library ID inside the LinkedIn account’s settings.media array so all three publish cleanly from one request.

For community management, PostSyncer syncs LinkedIn comments an hour after publish, every 6 hours on day one, then daily through day seven (plus on-demand POST /comments/sync). Because LinkedIn does not support hiding comments, PATCH /comments/{id}/hide answers 422 instructing your app to call DELETE /comments/{id} instead.

## Let AI agents tag companies and publish LinkedIn posts via MCP

PostSyncer’s MCP server includes find-linkedin-mentions alongside create-post and list-comments, so ChatGPT, Claude or Cursor can resolve real LinkedIn URNs and schedule executive posts in your brand voice.

Related pages: [LinkedIn MCP](https://postsyncer.com/linkedin-mcp), [LinkedIn scheduler](https://postsyncer.com/linkedin-scheduler), [Unified social media API](https://postsyncer.com/unified-social-media-api).

## Limits and plans

| Plan | Social accounts | Posts | API posts a day, per network |
| --- | --- | --- | --- |
| Free | 2 | 20 a month | Within the 20 |
| Starter ($29 a month) | 10 | Unlimited | Unlimited |
| Pro ($49 a month) | 30 | Unlimited | Unlimited |
| Agency ($99 a month) | 100, then $1/mo each | Unlimited | Unlimited |

Every plan: 60 requests a minute for each PostSyncer user, across all their keys, the API and the MCP server together.

## FAQ

### Does the LinkedIn API support both personal profiles and Company Pages?

Yes. Both personal LinkedIn profiles and LinkedIn Company Pages connect under platform: linkedin and support text, photos, MP4 videos, PDF documents and polls.

### How do I tag a person or company in a LinkedIn post via the API?

Call GET /api/v1/accounts/{id}/linkedin/mentions?q= with a company’s LinkedIn link or short name, or the name of a teammate, a Page follower or someone you tagged before. Paste the returned @[Name](urn:li:...) tag into content[0].text or settings.title. Plain @names are not linked by LinkedIn, and LinkedIn offers no search of all its members.

### Can I publish LinkedIn PDF document carousels through the API?

Yes. Upload a PDF, DOC, DOCX, PPT or PPTX file and pass it as the sole file in content[0].media. PostSyncer publishes it as LinkedIn’s native swipeable document post.

### Why was my MOV or WebM video refused on LinkedIn?

LinkedIn accepts MP4 videos only through PostSyncer’s API (up to 500 MB, 3s–30m). Convert the clip to MP4 or provide an MP4 library ID in LinkedIn’s accounts[].settings.media.

### Can I hide LinkedIn comments through the API?

No. LinkedIn has no hide-comment capability, so PATCH /comments/{id}/hide returns 422. Use DELETE /comments/{id} to remove a comment instead.

### Can a LinkedIn first comment include a photo?

Yes. A first comment (is_first_comment: true) and a comment reply can both include one photo on LinkedIn (no video or document).

---

Page: https://postsyncer.com/linkedin-api · Updated 2026-11-27
