Platform Guides6 min read

Why Your LinkedIn Post Got Cut Off: The Parenthesis Problem in LinkedIn's API

A LinkedIn post published through the API comes back with HTTP 201, but only half of it appears on the feed. The cause is almost always one character — usually a parenthesis. Here is why LinkedIn does this, which characters trigger it, and how to escape your text so the whole post publishes.

AT
Autoadify Team
Engineering
Share:

Quick Answer: Why Is My LinkedIn Post Cut Off?

LinkedIn's Posts API does not treat post text as plain text. The commentary field uses LinkedIn's "Little Text Format", in which characters such as ( ) [ ] { } < > @ * _ ~ | and \ open formatting elements like mentions and hashtags. When one of them appears unescaped, LinkedIn can drop everything from that character to the end of the post — and still return HTTP 201 Created, with no error. The fix is to put a backslash before each reserved character before you send the post, while leaving # alone when it starts a hashtag.

This only affects posts created through the API: scripts, integrations and scheduling tools. Posts typed into LinkedIn itself are not affected.

201 The status LinkedIn returns for a truncated post
15 Reserved characters, including #
1 Unescaped character needed to lose the rest of a post
0 Errors, warnings or log lines when it happens

What it looks like

We found this the way most people do: in a published post. A long LinkedIn update was sent through the API and LinkedIn confirmed it with 201 Created. On the feed, it stopped mid-sentence at "Work with Stateless". The original continued "(2026-07-28, New)" and ran for roughly 1,200 characters. LinkedIn had published the first 367.

Nothing in the response said anything was wrong. The only way to see it was to open the post.

Why LinkedIn does this

The commentary field in LinkedIn's Posts API is written in Little Text Format, a small markup language LinkedIn uses to embed mentions, hashtags and templates inside text. In that format, certain characters are syntax, not punctuation. A parenthesis can open an element; if the element never closes the way the parser expects, the remainder of the text is not rendered.

LinkedIn's documentation says these characters must be escaped. What it does not make obvious is the failure mode: not an error, but a quietly shortened post.

The characters that trigger it

CharacterEscape it?Example of where it appears in normal writing
( )AlwaysDates, asides, "(link in comments)"
[ ] { }AlwaysPlaceholders, "[thread]", code
< >AlwaysArrows such as "->", comparisons
@Always (in plain text)Email addresses, "@ 3pm"
* _ ~AlwaysMarkdown-style *emphasis* and _underscores_ in names
| \AlwaysSeparators, file paths
#Only when not followed by a letter or number"# of users", a lone "#"

Parentheses are the usual culprit simply because they are the most common in ordinary writing. AI-written posts are especially exposed, because models use brackets, asterisks and arrows freely.

How to fix it

  1. Escape every reserved character with a backslash. A parenthesis becomes \(, an asterisk becomes \*, and so on.
  2. Do it in a single pass. Backslash is itself reserved. If you escape backslashes in a second pass, you will double-escape the backslashes you just added.
  3. Leave hashtags alone. A # followed by a letter or digit is a valid hashtag, and escaping it turns a clickable #hashtag into plain text that reads \#hashtag. Escape # only when nothing word-like follows it.
  4. Escape only the post text. Apply this to the commentary of posts. LinkedIn's comment endpoint uses a different text shape, and escaping comments adds visible backslashes.
  5. Check one published post with brackets in it. Because the API reports success either way, the only real test is reading the post on LinkedIn.

In JavaScript or TypeScript, the whole fix is two replacements:

const RESERVED = /[\\|{}@[\]()<>*_~]/g;

function escapeLinkedInText(text) {
  return text
    .replace(RESERVED, (ch) => "\\" + ch)       // one pass, backslash included
    .replace(/#(?![\p{L}\p{N}])/gu, "\\#");   // # only when it is not a hashtag
}

Who this affects

  • Anyone posting through the LinkedIn API directly — custom scripts, internal tools, n8n or Make HTTP nodes that pass text straight through.
  • AI-generated posts, which use parentheses, arrows and asterisks far more than people typing into LinkedIn do.
  • Scheduled posts, where nobody is looking at the feed when the post goes out.

If you use a scheduling tool, the quickest check is to schedule a test post containing "(test) [test] *test* and #hashtag" and see whether all of it appears, with the hashtag still clickable.

Frequently Asked Questions

Why does LinkedIn return 201 if the post was truncated?

From LinkedIn's side, the request was valid: it parsed the markup it was given and created a post. The truncation is how the parser handles an element that does not close, not a rejected request.

Does this happen when I post in the LinkedIn app?

No. It affects text sent to the Posts API, which is what integrations and scheduling tools use.

Should I escape the # in hashtags?

No. A # followed by a letter or number is a hashtag element, and escaping it makes the hashtag unclickable. Escape # only when it is not starting a word.

Do I need to escape LinkedIn comments too?

Not through the comments endpoint, which uses a different text format. Escaping there leaves literal backslashes in the comment.

Which characters does LinkedIn's Little Text Format reserve?

Backslash, pipe, curly braces, at sign, square brackets, parentheses, angle brackets, asterisk, underscore, tilde and, in some positions, #.

Can I edit the truncated post to fix it?

You can edit it on LinkedIn by hand. If you republish through the API, escape the text first or the same thing happens again.

The Bottom Line

LinkedIn's API reads your post as markup. Escape the reserved characters in one pass, leave real hashtags alone, and verify on the feed rather than trusting the 201 — because a truncated post and a complete one return exactly the same response.

Post to LinkedIn without checking every bracket

Autoadify escapes LinkedIn text at the single point every post passes through — the composer, scheduled posts, workflows and the AI agent all publish the whole post, with hashtags still clickable. See how LinkedIn automation works in Autoadify, or start free.

Tags:LinkedInLinkedIn APITroubleshootingDevelopersSocial Media Tools
Early Access

Ready to automate your social media?

Autoadify gives you access to 70+ AI models, auto-scheduling across 10+ platforms, Shopify sync, and AI agents — all in one platform.

Start free