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.

Constraints

⏺️ Root Start: allowed, when postUrl or postUrn parameter is provided.

⬆️ Parent Actions: st.openPost, st.doForPosts.

⬇️ Child Actions: N/A.

Parameters

json
{
  "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"
    }
  ]
}
  • label (optional) – custom label for tracking this action in workflow completion.
  • postUrl (required for root start unless postUrn is provided, forbidden for parent start) – LinkedIn URL of the post to repost.
  • postUrn (optional) – URN of the post, accepted instead of postUrl. 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 in text. Write @[key] where the mention should appear, and describe that key here. 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, personHashedUrl and companyHashedUrl per 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.
  • name is 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

  1. Successful repost:
json
{
  "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.

postUrl and postUrn are null when the repost was published but LinkedIn did not return its address. Do not retry: the repost is already live.

  1. Failed repost:
json
{
  "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.