st.createRepost
This action allows you to repost someone else's post or your own. You can repost it as is, or add your own commentary with optional mentions of people and companies.
In the SDK this is the createRepost method. It takes the parameters below except label and then, which exist only in workflow JSON, and returns the result below in data.
In the CLI this is linkedin post repost – the command is below, under Parameters.
Constraints
⏺️ Root Start: allowed, when
postUrlorpostUrnparameter is provided.
⬆️ Parent Actions: st.openPost, st.doForPosts.
⬇️ Child Actions: N/A.
Parameters
{
"actionType": "st.createRepost",
"label": "repost1",
"postUrl": "https://www.linkedin.com/posts/post1",
"text": "Worth reading, especially the part on onboarding. Great work @[author]!",
"mentions": [
{
"key": "author",
"name": "Example Person",
"personHashedUrl": "https://www.linkedin.com/in/ACwAAAxxxxxxxxx"
}
]
}In AI assistants, the MCP server runs this action as the create_repost tool.
In the CLI this is linkedin post repost:
linkedin post repost <url> [flags]| Arg | Required | Description |
|---|---|---|
url | yes | URL or URN of the post to repost |
| Flag | Type | Description |
|---|---|---|
--text | string | Your own commentary (up to 3000 characters). Without it the post is reposted as is. |
--mention | string | One mention, bound to @[key] in --text. Same format as for post create – see passing mentions. Can be specified multiple times, up to 20. |
The repost's own postUrl and postUrn are printed on success – not those of the post you reposted. They are empty when the repost was published but LinkedIn did not return its address; do not retry, the repost is already live.
alreadyRepostedis returned only when LinkedIn refuses an instant repost (one without--text). LinkedIn does not always refuse a repeat repost: a repost of your own post, or a repost with commentary, can be published again. Keep track of what you have already reposted instead of relying on this error.
Reposts count toward the same posting limit as
post create.
label(optional) – custom label for tracking this action in workflow completion.postUrl(required for root start unlesspostUrnis provided, forbidden for parent start) – LinkedIn URL of the post to repost.postUrn(optional) – URN of the post, accepted instead ofpostUrl. When both are provided, the URL must contain that same URN.text(optional) – your own commentary, up to 3000 characters. Without it the post is reposted as is.mentions(optional) – people and companies to mention intext. Write@[key]where the mention should appear, and describe thatkeyhere. Maximum 20 items.key(required) – placeholder name used in the text as@[key]. From 1 to 30 characters: letters, digits,_or-.name(required) – name to find the person or company by, from 1 to 100 characters.urn(optional) – URN of the entity:urn:li:member:<id>for a person,urn:li:organization:<id>for a company.personHashedUrl(optional) – hashed LinkedIn profile URL of the person.companyHashedUrl(optional) – hashed LinkedIn company page URL.
Mention rules
- Provide at most one of
urn,personHashedUrlandcompanyHashedUrlper mention. - Every
@[key]in the text must have a matching mention, and every mention must appear in the text. - Two mentions cannot share the same
key. nameis required even when an identifier is given, because LinkedIn resolves a mention through its own name suggestions. The identifier only decides which of the offered namesakes is taken. See publishing posts for the full explanation.
Result options
- Successful repost:
{
"actionType": "st.createRepost",
"label": "repost1",
"success": true,
"data": {
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:1234567890123456789",
"postUrn": "urn:li:activity:1234567890123456789"
}
}label– included only if specified in the action parameters.data.postUrl– URL of the repost. A repost is a post of your own account, so this is not the URL of the post you reposted.data.postUrn– URN of the repost.
postUrlandpostUrnarenullwhen the repost was published but LinkedIn did not return its address. Do not retry: the repost is already live.
- Failed repost:
{
"actionType": "st.createRepost",
"label": "repost1",
"success": false,
"error": {
"type": "alreadyReposted",
"message": "LinkedIn declined this repost because the account has already reposted this post."
}
}label– included only if specified in the action parameters.error.type– enum with the following possible values:postNotFound– provided URL is not an existing LinkedIn post.repostNotAllowed– LinkedIn offers no repost control for this post.alreadyReposted– the account has already reposted this post and LinkedIn declined to repost it again.mentionNotResolved– a person or company the text mentions was not among the options LinkedIn offered for that name.