# Cross-post from LinkedIn to X

To cross-post from LinkedIn to X with PubNio, add a caption of 280 or fewer weighted characters to the X target. 8 of 11 publishing rules differ, and one request with a target for each network publishes both (provider rules read 2026-12-05).

## What changes from LinkedIn to X

| Rule | LinkedIn | X | What to change |
| --- | --- | --- | --- |
| Caption limit | 3,000 | 280 | the 444-character draft is 164 over 280: set `targets[1].text` |
| Caption counting | code points | X weights | a URL costs 23, an emoji 2 |
| Media per post | 1 video, 1 PDF, or up to 20 images | up to 4 images, 1 GIF, or 1 video | 20 images on LinkedIn, 4 here: more fail with `media_count` |
| Photo file PubNio accepts | JPEG, PNG; 10 MB | JPEG, PNG, WebP; 5 MB | a file over 5 MB fails with `media_too_large` |
| Links | in the text | in the text, counted as 23 | each URL uses 23 of the 280 |
| Replies | `thread` comments, `firstComment` | `thread` of up to 24, `firstComment` | `targets[1].settings` takes its own `thread` |
| Network fee | none | $0.015 a post, or $0.20 with a link | paid from prepaid credit; short of it, create answers 402 `insufficient_credit` |
| Account | account or Page | account | `targets[1].accountId` is a connected X account |

## What each network states

| Rule | LinkedIn | X |
| --- | --- | --- |
| Caption | [3,000 characters](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/ugc-post-api) | [280 characters (more with X Premium)](https://docs.x.com/x-api/posts/create-post) |
| Photo formats | [JPG, GIF, PNG (also stated: JPEG, PNG)](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/images-api) | not stated |
| Photo size | not stated | [5MB; JPG, PNG, GIF, WEBP](https://docs.x.com/x-api/media/upload-media) |
| Repeats | [10 minutes before identical content](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/ugc-post-api) | [No unsolicited mentions or identical cross-posting](https://docs.x.com/developer-guidelines) |

## One request for both

```http
POST /api/v1/posts?workspaceId=4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b
Authorization: Bearer pn_live_***
Idempotency-Key: crosspost-linkedin-to-x-1
Content-Type: application/json

{
  "text": "We moved our billing system to a new ledger last quarter. Three lessons. First, write down every invariant before you touch a table: we found eleven rules that lived only in people's heads. Second, run old and new side by side and diff every result for a full billing cycle; the diffs found our two worst bugs. Third, make the cutover boring: one customer segment per day, with a rollback ready for each. Zero billing incidents during the move.",
  "media": [
    {
      "mediaId": "8b2f3c4d-5e6f-4071-9283-94ab5c6d7e8f"
    }
  ],
  "publishNow": true,
  "targets": [
    {
      "accountId": "2d8f4c36-9e5f-4a7a-9c32-4b6d8e0f2a33",
      "provider": "linkedin",
      "placement": "feed"
    },
    {
      "accountId": "50bc7f69-c182-4dad-8f65-7e9ab13c5d66",
      "provider": "x",
      "placement": "feed",
      "text": "We moved billing to a new ledger last quarter. Three lessons: write down every invariant first, diff old and new for a full cycle, and make the cutover boring."
    }
  ]
}
```

- `targets[0]` publishes to LinkedIn as `feed` and `targets[1]` to X as `feed`; both use the uploaded photo in `media`.
- `targets[1].text` replaces the 444-character caption for X with a 159-character one, under its 280.
- The X target carries X's fee of $0.015 a post, or $0.20 with a link, paid from prepaid credit; when the balance cannot pay it, create answers 402 `insufficient_credit` and neither network publishes.
- The 202 lists each target on its own: if X fails, the LinkedIn post stands, and `posts.retry` retries X alone.

## Sent unchanged to X

A bare `targets[1]` gets 422 [invalid publication](https://pubnio.com/docs/problems/invalid-publication/), and neither network publishes:

| Issue | Path | Message |
| --- | --- | --- |
| `caption_too_long` | `text` | This caption contains 444 weighted characters. The limit is 280. |

## Limits

- PubNio does not shorten the caption or fill in settings for X: until both targets pass, create publishes neither.
- Create checks the photo's type, size, and count, not its pixel size or aspect ratio; LinkedIn and X each crop or reject on their own.

## Sources

- [UGC Post API (legacy)](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/ugc-post-api), read 2026-12-05
- [X API: Create or Edit Post](https://docs.x.com/x-api/posts/create-post), read 2026-12-05
- [Images API](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/images-api), read 2026-12-05
- [X API: Upload Media](https://docs.x.com/x-api/media/upload-media), read 2026-12-05
- [X Developer Guidelines](https://docs.x.com/developer-guidelines), read 2026-12-05

## Related

- [LinkedIn publishing API](https://pubnio.com/platforms/linkedin)
- [X (Twitter) publishing API](https://pubnio.com/platforms/x)
- [X media rules](https://pubnio.com/docs/providers/x/media/)
- [Create a post](https://pubnio.com/docs/reference/posts-create/)
- [Retry one target](https://pubnio.com/docs/reference/posts-retry/)
- [Import media by URL](https://pubnio.com/docs/reference/media-import/)
- [Cross-posting between every pair](https://pubnio.com/cross-posting)

