UGC Post API

UGC Post is an upcoming API that will eventually replace the Shares API. UGC Post is currently best suited for creating and fetching video posts. The Shares API does not support video. Use the UGC Post API to create video content for organic posts and video ads. More functionality will be soon be added to the UGC Post API.

As of now, you cannot retrieve the actual video content of a video post. This feature will be available soon.

Note

Creation of video UGC Posts is currently a restricted feature. This permission is granted to select developers only.

Permissions

Permission Description
w_organization_social Post, comment and like posts on behalf of an organization. Restricted to organizations in which the authenticated member has one of the following company page roles.
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER
  • RECRUITING_POSTER/li>
r_organization_social Retrieve organizations' posts, comments, and likes. Restricted to organizations in which the authenticated member has one of the following company page roles.
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER
w_member_social Post, comment and like posts on behalf of an authenticated member.
r_member_social Restricted Retrieve posts, comments, and likes on behalf of an authenticated member. This permission is granted to select developers only.

If you are using legacy permissions, please refer to this page for requesting legacy permissions.

See Organization Access Control for more information on company page roles.

Note

All API requests are represented in protocol 2.0.0 and require the header X-Restli-Protocol-Version: 2.0.0.

Schema

Field Description Format Required
author Urn of the author of this content. Person(read-only) or Organization Urn Yes
clientApplication For posts from API creation only. Developer Application Urn Optional
containerEntity Urn of container entity that contains the user generated content such as a Group. Urn Optional
contentCertificationRecord The content certification record associated with this content. Used to maintain information about the content's visibility and spam status. String Optional
created An AuditStamp corresponding to the creation of this resource. AuditStamp Yes
deleted An AuditStamp corresponding to the deletion of this resource. AuditStamp Optional
distribution LinkedIn and external destinations where the UGC post will be distributed. Distribution Optional
firstPublishedAt The time at which this content was first published. Represented in epoch time. long Optional
id Unique id for this object. Can contain more urn types in the future. ugcPostUrn or shareUrn Yes
lastModified An AuditStamp corresponding to the last modification of this resource. AuditStamp Yes
lifecycleState The state of this content. Can be the following enum values:
  • DRAFT - Represents a content that is accessible only to the author and is not yet published.
  • PUBLISHED - Represents a content that is accessible to all entities.
  • PROCESSING - Represents a content that has been submitted for publish but is not yet ready for rendering. The content will be published asynchronously once the processing has successfully completed.
  • PROCESSING_FAILED - Represents a content that has been submitted for publish but a processing failure caused the publish to fail. An edit is required in order to re-attempt the publish.
  • DELETED - Represents a content that was once in another state, but has been deleted.
  • PUBLISHED_EDITED - Represents a content that was published and later edited.
Enum String Yes
origin This field is planned to be deprecated. Please use ugcOrigin for the service provider instead. The service provider that created this UGC. Can be the following enum values:
  • API - Partner using external API
  • ELEVATE - Elevate app
  • FIREFOX - Firefox browser extension
  • FLAGSHIP - Mobile flagship app
  • IN_SHARE - InShare on 3rd party sites
  • DESKTOP - Desktop site
  • LSS - Sales Navigator
  • PULSE - Pulse app
  • SLIDESHARE - InShare on Slideshare
Enum String Optional
responseContext The context in which this content was created. Represents concepts such as reshare and reshare attribution. ResponseContext Optional
specificContent Represents type-specific content of this object. For a share this is the share text and media, and for an article it is the article contents. ShareContent Yes
targetAudience Intended audience or best fit audiences for this content as decided by the owner. TargetAudience Optional
ugcOrigin The service provider that created this UGC. Can be the following enum values:
  • API - Partner using external API
  • ELEVATE - Elevate app
  • FIREFOX - Firefox browser extension
  • FLAGSHIP- Mobile flagship app
  • IN_SHARE - InShare on 3rd party sites
  • DESKTOP - Desktop site
  • LSS - Sales Navigator
  • PULSE - Pulse app
  • SLIDESHARE - InShare on Slideshare
Enum String Optional
versionTag Version tag of the entity. String Optional
visibility Visibility restrictions on content. Can be: com.linkedin.ugc. MemberNetworkVisibility which has the values of:
  • CONNECTIONS - Represents 1st degree network of owner.
  • PUBLIC - Anyone can view this.
  • LOGGED_IN - Viewable by logged in members only.
com.linkedin.ugc. SponsoredContentVisibility which has the value of:
  • DARK - Represents a dark post, which is only distributed as part of a sponsored campaign.
Union [MemberNetwork Visibility, SponsoredContent Visibility] Yes

Distribution

Field Sub-Field Description Format
distributedVia FollowFeed Whether UGC post is distributed to follow-feed or not. boolean
externalDistribution Channels External distribution channels that this content is distributed to. Array
externalDistribution ChannelType Can be the following values:
  • TWITTER- Distribute content to Twitter
  • TENCENT- Distribute content to Tencent
  • WEIBO - Distribute content to Weibo
Enum Values

ResponseContext

Field Description Format
parent The content that a piece of content is a response to. Currently, the only supported Urn is ugcPost Urn. Urn
root The greatest ancestor content that a piece of content is a response to. Currently, the only supported Urn is ugcPost Urn. Urn

ShareContent

Field Sub-Field Description Format Required
media The media shared in this share. Can be videos, images, or articles. Array of ShareMedia Yes
primaryLandingPageUrl The main landing page URL of the share. String Optional
shareCategorization Categorization info associated with the share. Optional
skills Skill categorizations for a share Array of skill Urn Default to empty array
shareCommentary The message content of this share.
attributes User generated attributes in the text. Array of Attribute Default to empty array
inferredLocale The locale that may have be inferred for this text. String Optional
text The text content that may be attributed. Defaults to "" String Yes
shareMediaCategory The type of media contained within the media field of this object. Can be the following enum values:
  • ARTICLE - Represents shared content that only contains articles.
  • IMAGE - Represents shared content that only contains images.
  • NONE - Represents shared content that does not contain any media.
  • RICH - Represents shared content that only cotains rich media.
  • VIDEO - Represents shared content that only contains videos.
  • LEARNING_COURSE - Represents shared content that only contains learning courses.
  • JOB - Represents shared content that only contains jobs.
  • QUESTION - Represents shared content that only contains questa questions.
  • ANSWER - Represents shared content that only contains questa answers.
  • CAROUSEL - Represents shared content of various types that should be rendered in carousel format.
  • TOPIC - Represents shared content that only contains topics.
  • NATIVE_DOCUMENT - Represents shared content of document file types that are uploaded natively.
  • URN_REFERENCE - Refer to the media urn for the category of the content, except when urn type is digital media asset because this urn type does not expose the content type. Use mediaType in ShareMedia when disambiguation is required.
  • LIVE_VIDEO - Represents shared content of a video that is streamed live. This means that the ugcPost may be consumed during recording. The resource serving the media is the source of truth for whether the video is currently live.
Enum string Yes

ShareMedia

Field Sub-Field Description Format Required
description The description of this media.
attributes User generated attributes in the text. Array of Attribute Default to empty array
inferredLocale The locale that may have be inferred for this text. String Optional
text The text content that may be attributed. Defaults to "" String Yes
landingPage Url that overrides the landing page. Optional
landingPageTitle If present, this content entity will be rendered as a CTA with landingPageTitle as the CTA text and landingPageUrl as the click through url. String Optional Possible values are- LEARN_MORE APPLY_NOW DOWNLOAD GET_QUOTE SIGN_UP SUBSCRIBE REGISTER
landingPageUrl The click through url String Yes if landing page present
media The URN of the media shared. Can be IngestedVideoMetadata Urn, IngestedImageMetadata Urn, IngestedArticleMetadata Urn, IngestedContent Urn, IngestedRichMedia Metadata Urn, DigitalmediaAsset Urn, or Content Urn. Urn Yes
mediaOverlay An overlay associated with a media(video, image etc). Optional
overlay Union of possible MediaOverlay model, could be media frame, stickers etc. MediaFrame object
originalUrl URL whose content is summarized; content may not have a corresponding url for some entities. String Optional
status The status of the availability of this media. Can be the following values:
  • PROCESSING - This ShareMedia is processing and not yet available.
  • READY - This ShareMedia is immediately available.
  • FAILED - This ShareMedia is not available and no further processing is being done.
Enum String Yes
thumbnails The thumbnails saved from the ingestion of this article.
altText The alternate text of this thumbnail. String Optional
height Height of the media in pixels. int Optional
size Size of the media in bytes. long Optional
url The url of this media. String Yes
width Width of the media in pixels. int Optional
title The title of this media.
attributes User generated attributes in the text. Array of Attribute Default to empty array
inferredLocale The locale that may have be inferred for this text. String Optional
text The text content that may be attributed. Defaults to "" String Yes

Attribute

Field Sub-Field Description Format
length The length of the range within the referenced ordered collection. int
start Starting position of the range within the referenced ordered collection. int
value The value of the attribute that applies to given range. Union [MemberAttributedEntity, CompanyAttributedEntity, SchoolAttributedEntity]
com.linkedin.common. MemberAttributedEntity Contains a member field that points to a personUrn personUrn
com.linkedin.common. CompanyAttributedEntity Contains a company field that points to an organization Urn organizationUrn
com.linkedin.common. SchoolAttributedEntity Contains a school field that points to an organization Urn organizationUrn

TargetAudience

Field Sub-Field Description Format
targetedEntities The entities targeted for distribution. Structured as an object containing multiple arrays of targeting entity URNs that functions like a series of OR conditionals. Array of Targets (see below)
degrees Standardized degrees to be targeted. Array of Degree Urn
fieldsOfStudy Standardized fields of study to be targeted. Array of FieldOfStudy Urn
industries Industries to be targeted. Array of Industry Urn
interfaceLocales Interface locales to be targeted. Array of Locale
jobFunctions Top level groupings of supertitles to be targeted. Array of Function Urn
locations Location to be targeted. The urns do not need to all be of the same type. The permitted urn types are: 'countryGroup', 'country', 'state', and 'region' Array of Location Urn
schools Standardized schools to be targeted. Array of School Urn
seniorities Seniorities to be targeted Array of Seniority Urn
staffCountRanges Organization sizes to be targeted. Can be the following enum values:
  • SIZE_1
  • SIZE_2_TO_10
  • SIZE_11_TO_50
  • SIZE_51_TO_200
  • SIZE_201_TO_500
  • SIZE_501_TO_1000
  • SIZE_1001_TO_5000
  • SIZE_5001_TO_10000
  • SIZE_10001_OR_MORE
Array of StaffCountRange

Note

The audience you target for your share must be greater than 300 members. See Target Organic UGC Posts for more information

Create UGC Posts

Creating UGC Posts with video requires uploading a video asset to get a digitalmediaAsset URN to be used in creating the UGC Post. See the Vector Assets API for instructions on how to do this.

Create Organic UGC Posts

Sample Request

POST https://api.linkedin.com/v2/ugcPosts

Make sure to set the Content-Type header to application/json. If you plan to sponsor this post later, make sure you set shareContent.ShareMedia.landingPage and shareContent.ShareMedia.title when you create the post.

{
    "author": "urn:li:organization:5590506",
    "lifecycleState": "PUBLISHED",
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "media": [
                {
                    "description": {
                        "attributes": [],
                        "text": "Sample Description"
                    },
                    "media": "urn:li:digitalmediaAsset:C5500AQG7r2u00ByWjw",
                    "status": "READY",
                    "thumbnails": [],
                    "title": {
                        "attributes": [],
                        "text": "Sample Video Create"
                    }
                }
            ],
            "shareCommentary": {
                "attributes": [],
                "text": "Some share text"
            },
            "shareMediaCategory": "VIDEO"
        }
    },
    "targetAudience": {
        "targetedEntities": [
            {
                "locations": [
                    "urn:li:country:us",
                    "urn:li:country:gb"
                ],
                "seniorities": [
                    "urn:li:seniority:3"
                ]
            }
        ]
    },
    "visibility": {
        "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
    }
}

The UGC Post is created with a 201 Created response and the response header X-RestLi-Id contains the ugcPost ID.

Create Targeted Organic UGC Posts

To increase the engagement and impact of your message, you may want to target organizational UGC Posts to a subset of your followers. You can select a target audience within your company's existing follower base by using predefined criteria known as targeting facets.

Examples of targeting facets include geography, job function, industry, and seniority level. See Ads Targeting and Standardized Data to create a segment of a specific audience you may want to target.

The audience you target for your UGC Post must be greater than 300 members. Use the Audience Counts API to calculate the approximate size of your audience. Make sure to pass in your company URN in the followedCompanies field of the targetingFacet parameter so your audience count will be filtered down to only members who follow your company.

Sample Request

GET https://api.linkedin.com/v2/audienceCountsV2?q=targetingCriteria&target.includedTargetingFacets.industries[0]=urn:li:industry:4&target.includedTargetingFacets.seniorities[0]=urn:li:seniority:3&target.includedTargetingFacets.locations[0]=urn:li:country:us&target.includedTargetingFacets.locations[1]=urn:li:country:gb&target.includedTargetingFacets.followedCompanies[0]=urn:li:organization:2414183

Sample Response

{
    "elements": [
        {
            "active": 0,
            "total": 380
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}

Since this audience size is above 300, we can create a targeted organic UGC Post with these targeting details in the targetAudience.targetedEntities object. The targetAudience.targetedEntities object is structured as an array that accepts a single object. That object contains multiple targeting entity arrays. Each targeting facet array accepts targeting entity URNs. See the sample request below for an example.

Do not send null-equivalent targetAudience.targetedEntities objects where no targeting entity URNs are provided. If you do not want to target a UGC post, do not include the targetAudience field. See the following examples for null-equivalent targeting that is not supported.

  • "targetAudience": {"targetedEntities":[{"industries":[]},{"jobFunctions":[]}
  • "targetAudience": {"targetedEntities":[{}]}
  • "targetAudience": {"targetedEntities":[]}
  • "targetAudience": {}

Sample Request

POST https://api.linkedin.com/v2/ugcPosts
{
    "author": "urn:li:organization:2414183",
    "lifecycleState": "PUBLISHED",
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "media": [
                {
                    "description": {
                        "attributes": [],
                        "text": "Sample Description"
                    },
                    "media": "urn:li:digitalmediaAsset:C5500AQG7r2u00ByWjw",
                    "status": "READY",
                    "thumbnails": [],
                    "title": {
                        "attributes": [],
                        "text": "Sample Video Create"
                    }
                }
            ],
            "shareCommentary": {
                "attributes": [],
                "text": "Some share text"
            },
            "shareMediaCategory": "VIDEO"
        }
    },
    "targetAudience": {
        "targetedEntities": [
            {
                "locations": [
                    "urn:li:country:us",
                    "urn:li:country:gb"
                ],
                "seniorities": [
                    "urn:li:seniority:3"
                ],
                "industries": [
                    "urn:li:industry:4"
                ]
            }
        ]
    },
    "visibility": {
        "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
    }
}

Create Dark UGC Posts

You can create a dark UGC Post using an author as the organization urn:li:organization:{id} and setting visibility.com.linkedin.ugc.SponsoredContentVisibility = DARK. See the following example of a dark UGC Post for a video.

Sample Request

Make sure to set the Content-Type header to application/json. Dark posts must be associated with AdDirectSponsoredContent.

POST https://api.linkedin.com/v2/ugcPosts
{
    "author": "urn:li:organization:5590506",
    "lifecycleState": "PUBLISHED",
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "media": [
                {
                    "description": {
                        "attributes": [],
                        "text": "Sample Description"
                    },
                    "landingPage": {
                        "landingPageTitle": "LEARN_MORE",
                        "landingPageUrl": "https:linkedin.com"
                    },
                    "media": "urn:li:digitalmediaAsset:C5500AQG7r2u00ByWjw",
                    "status": "READY",
                    "thumbnails": [],
                    "title": {
                        "attributes": [],
                        "text": "Sample Video Create"
                    }
                }
            ],
            "shareCommentary": {
                "attributes": [],
                "text": "Some share text"
            },
            "shareMediaCategory": "VIDEO"
        }
    },
    "visibility": {
        "com.linkedin.ugc.SponsoredContentVisibility": "DARK"
    }
}

The UGC Post is created with a 201 Created response and the response header X-RestLi-Id contains the ugcPost ID.

To prevent failures, make sure to verify the following:

  • The registerUploadRequest.owner field of the referenced asset is the same as the author field when you create the UGC Post.
  • ShareContent.shareMediaCategory matches the same category as the media URN.
  • visibility can be set as SponsoredContentVisibility only when author is an organization URN.
  • shareContent.ShareMedia.landingPage.landingPageUrl is a required field for Video Dark Posts.
  • The member must have the role of Company Page ADMINISTRATOR or DIRECT_SPONSORED_CONTENT_POSTER.

When a UGC Post is published ("lifecycleState": "PUBLISHED"), an authorized member can view the post using:

https://www.linkedin.com/feed/update/urn:li:ugcPost:<id>/

Mentions in UGC Posts

You may create UGC Posts with mentions or tags of other Linkedin entities such as organizations or members. This requires providing the URN for the referenced entity, and specifying what part of the UGC Post's text should be rendered as a link to the entity.

The text linking to the entity must match the name of the member or organization to be converted into a link. Matching is case sensitive. If there is no match, that part will appear as normal text. This includes cases where the length provided is longer or shorter than the name of the member or organization. The exception to this for member annotations is described next.

Mentions of members only need to match one name in the full name. For example, take a member named "Jane Smith". A share can match on "Jane", "Smith", or "Jane Smith".

Mentions of organizations must match the full name.

Schema

Field Description Format
attributes Allows links to other entities such as members within share text. Array of attributes.
attributes[i].start Starting character index of where in the text the annotation link should begin. Zero-based index. int
attributes[i].length The length of the text of be linked. int
attributes[i].value Describes the type of entity being mentioned. Possible values are:
  • com.linkedin.common.CompanyAttributedEntity
  • com.linkedin.common.MemberAttributedEntity
This field accepts an object containing the referenced entity. See CompanyAttributedEntity, MemberAttributedEntity, and the sample request body for more information.
Union CompanyAttributedEntity, MemberAttributedEntity ]

CompanyAttributedEntity

Field Description Format
company The URN of organization being mentioned. Organization URN

MemberAttributedEntity

Field Description Format
member The URN of the person being mentioned. Person URN

Sample Object

The sample below mentions a company called Acme Corp. start=6 because Acme Corp starts on the sixth character of the text using a zero-based index. length=9 because "Acme Corp" is 9 characters long.

{
    ...
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "shareCommentary": {
                "attributes": [
                    {
                        "length": 9,
                        "start": 6,
                        "value": {
                            "com.linkedin.common.CompanyAttributedEntity": {
                                "company": "urn:li:organization:1234"
                            }
                        }
                    }
                ],
                "text": "Hello Acme Corp"
            },
            "shareMediaCategory": "NONE"
        }
    },
    ...
}

Common Creation Errors

The table below lists commonly encountered errors creating UGC Posts. It is not meant to be a comprehensive list of all possible UGC Post creation errors.

Code Message Description
400 urn:li:developerApplication:{developer application ID} does not have permission to create ugc posts Indicates your developer application is not whitelisted to create video UGC Posts. UGC Post video creation is restricted to approved applications only.
400 Error parsing request body to json Unrecognized character escape Indicates your request payload is escaping characters it shouldn't. For example, escaping apostrophes such as "It\'s a test" will trigger this error. Review your payload for escaped characters and remove those escapes.
400 Post should only contain 1 set of targeting criteria Indicates the targetedEntities field has more than 1 targeting object. See Create Targeted Organic UGC Posts for the correct structure.
400 Target audience does not meet 300 follower minimum Indicates the targeted audience is too small to target. Audiences must have at least 300 members to be targeted. See Create Targeted Organic UGC Posts for how to calculate audience counts upfront.
409 Content is a duplicate of {share or UGC URN} Indicates the UGC Post is an exact duplicate of a recently created UGC Post. Wait 10 minutes for the duplicate restriction to expire or modify the content.
429 Member has reached share limit Indicates member has reached the maximum daily share limit.

Retrieve UGC Posts

Note that URNs included in the URL params must be URL encoded when using Restli 2.0. For example, urn:li:ugcPost:12345 would become urn%3Ali%3AugcPost%3A12345. Other parts of the params should not be encoded. Postman or similar API tools may not support these types of calls. Testing with curl is recommended if you encounter a 400 error with message Invalid query parameters passed to request.

Note

All API requests are represented in protocol 2.0.0 and require the header X-Restli-Protocol-Version: 2.0.0.

Get UGC Posts by URN

To retrieve a UGC Post, provide the context in which the user generated content is being viewed. ViewContext can be either AUTHOR or READER. You can retrieve UGC posts by URNs: ugcPostUrn (urn:li:ugcPost:{id}) or shareUrn (urn:li:share:{id}).

Sample Request

GET https://api.linkedin.com/v2/ugcPosts/{encoded ugcPostUrn|shareUrn}?viewContext=AUTHOR

Sample Response

{
    "author": "urn:li:person:123ABC",
    "contentCertificationRecord": "{\"originCountryCode\":\"us\",\"modifiedAt\":1500590592795,\"spamRestriction\":{\"classifications\":[],\"contentQualityClassifications\":[],\"systemName\":\"MACHINE_SYNC\",\"lowQuality\":false,\"contentClassificationTrackingId\":\"B6A8B437D1D5E59D123455F6DCE5B\",\"contentRelevanceClassifications\":[],\"spam\":false}}",
    "created": {
        "actor": "urn:li:person:123ABC",
        "time": 1500590543962
    },
    "firstPublishedAt": 1500590592702,
    "id": "urn:li:ugcPost:123456",
    "lastModified": {
        "actor": "urn:li:person:123ABC",
        "time": 1500590592806
    },
    "lifecycleState": "PUBLISHED",
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "media": [
                {
                    "media": "urn:li:digitalmediaAsset:123ABDEFHAG",
                    "status": "READY",
                    "thumbnails": []
                }
            ],
            "shareCommentary": {
                "attributes": [
                    {
                        "length": 35,
                        "start": 66,
                        "value": {
                            "com.linkedin.common.CompanyAttributedEntity": {
                                "company": "urn:li:organization:12345"
                            }
                        }
                    }
                ],
                "text": "Testing a UGC Post!"
            },
            "shareMediaCategory": "VIDEO"
        }
    },
    "versionTag": "2",
    "visibility": {
        "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
    }
}

Batch Get UGC Posts

Multiple UGC Posts can be retrieved in a single API call by passing in multiple UGC Post Urns into the ids parameter. The UGC Post URNs should be passed in List format and should be encoded as shown in the examples below. Note that the , in the List separating each URN does not need to be encoded.

Sample Request

GET https://api.linkedin.com/v2/ugcPosts?ids=List({encoded ugcPostUrn},{encoded ugcPostUrn})
GET https://api.linkedin.com/v2/ugcPosts?ids=List(urn%3Ali%3AugcPost%3A6380472009834450944,urn%3Ali%3AugcPost%3A6380472009834450944)

Sample Response

{
    "errors": {},
    "results": {
        "urn:li:ugcPost:638047200983445094": {
            "author": "urn:li:person:Qih6zGPNUX",
            "contentCertificationRecord": "{\"originCountryCode\":\"us\",\"modifiedAt\":1500590592795,\"spamRestriction\":{\"classifications\":[],\"contentQualityClassifications\":[],\"systemName\":\"MACHINE_SYNC\",\"lowQuality\":false,\"contentClassificationTrackingId\":\"B6A8B437D1D5E59DCB4D00C95F6DCE5B\",\"contentRelevanceClassifications\":[],\"spam\":false}}",
            "created": {
                "actor": "urn:li:person:Qih6zGPNUX",
                "time": 1500590543962
            },
            "firstPublishedAt": 1500590592702,
            "id": "urn:li:ugcPost:6293932920864212345",
            "lastModified": {
                "actor": "urn:li:person:Qih6zGPNUX",
                "time": 1500590592806
            },
            "lifecycleState": "PUBLISHED",
            "specificContent": {
                "com.linkedin.ugc.ShareContent": {
                    "media": [
                        {
                            "media": "urn:li:digitalmediaAsset:123ABDEFHAG",
                            "status": "READY",
                            "thumbnails": []
                        }
                    ],
                    "shareCommentary": {
                        "attributes": [
                            {
                                "length": 35,
                                "start": 66,
                                "value": {
                                    "com.linkedin.common.CompanyAttributedEntity": {
                                        "company": "urn:li:organization:12345"
                                    }
                                }
                            }
                        ],
                        "text": "Testing a post!"
                    },
                    "shareMediaCategory": "VIDEO"
                }
            },
            "versionTag": "2",
            "visibility": {
                "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
            }
        }
    },
    "statuses": {}
}

Find UGC Posts by Authors

You can retrieve all UGC posts for a member or an organization. Use authors=List(person Urn) or authors=List(organization Urn) as the query parameter.

Even though authors is structured as an Array, you can currently only pass one value for authors. You will get a 400 Bad Request error with the message "Multi author finder not implemented, please make separate requests per author" if you pass more than one value.

URNs included in the URL params must be URL encoded. For example, urn:li:organization:12345 would become urn%3Ali%3Aorganization%3A12345. Other parts of the params do not need to be encoded. Postman or similar API tools may not support these types of calls. Testing with curl is recommended if you encounter a 400 error with message Invalid query parameters passed to request.

Sample Request

To retrieve all posts for a member:

GET https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List({encoded personUrn})

To retrieve all posts for an organization:

GET https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List({encoded organizationUrn})

Sample Response

{
    "elements": [
        {
            "author": "urn:li:person:V9W_L_bioc",
            "created": {
                "actor": "urn:li:csUser:4",
                "time": 1438989838000
            },
            "id": "urn:li:share:6035560836041302016",
            "lastModified": {
                "actor": "urn:li:csUser:4",
                "time": 1438989838000
            },
            "lifecycleState": "PUBLISHED",
            "specificContent": {
                "com.linkedin.ugc.ShareContent": {
                    "media": [],
                    "shareCommentary": {
                        "attributes": [],
                        "text": ""
                    },
                    "shareMediaCategory": "NONE"
                }
            },
            "ugcOrigin": "DESKTOP",
            "versionTag": "0",
            "visibility": {
                "com.linkedin.ugc.MemberNetworkVisibility": "LOGGED_IN"
            }
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}

Find UGC Posts by Container Entities

You can retrieve all UGC posts of a group using containerEntities.

Note that URNs included in the URL params must be URL encoded. For example, urn:li:group:12345 would become urn%3Ali%3Agroup%3A12345. Other parts of the params do not need to be encoded. Postman or similar API tools may not support these types of calls. Testing with curl is recommended if you encounter a 400 error with message Invalid query parameters passed to request.

Sample Request

GET https://api.linkedin.com/v2/ugcPosts?q=containerEntities&containerEntities=LIST({encoded groupUrn}, {encoded groupUrn})

Sample Response

{
    "elements": [
        {
            "author": "urn:li:person:V9W_L_bioc",
            "created": {
                "actor": "urn:li:csUser:4",
                "time": 1438989838000
            },
            "id": "urn:li:share:6035560836041302016",
            "lastModified": {
                "actor": "urn:li:csUser:4",
                "time": 1438989838000
            },
            "lifecycleState": "PUBLISHED",
            "specificContent": {
                "com.linkedin.ugc.ShareContent": {
                    "media": [],
                    "shareCommentary": {
                        "attributes": [],
                        "text": ""
                    },
                    "shareMediaCategory": "NONE"
                }
            },
            "ugcOrigin": "DESKTOP",
            "versionTag": "0",
            "visibility": {
                "com.linkedin.ugc.MemberNetworkVisibility": "LOGGED_IN"
            }
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}

You can retrieve a UGC post based on the permaLinkSuffixes.

Note that the colons in the permalinkSuffixes param must be URL encoded. For example, http://www.example.com would become http%3A//www.example.com. Postman or similar API tools may not support these types of calls. Testing with curl is recommended if you encounter a 400 error with message Invalid query parameters passed to request.

Sample Request

GET https://api.linkedin.com/v2/ugcPosts?q=permalinkSuffixes&permalinkSuffixes=List(http%3A//www.example.com,http%3A//www.example.com)

Sample Response

{
    "elements": [
        {
            "author": "urn:li:person:V9W_L_bioc",
            "created": {
                "actor": "urn:li:csUser:4",
                "time": 1438989838000
            },
            "id": "urn:li:share:6035560836041302016",
            "lastModified": {
                "actor": "urn:li:csUser:4",
                "time": 1438989838000
            },
            "lifecycleState": "PUBLISHED",
            "specificContent": {
                "com.linkedin.ugc.ShareContent": {
                    "media": [],
                    "shareCommentary": {
                        "attributes": [],
                        "text": ""
                    },
                    "shareMediaCategory": "NONE"
                }
            },
            "ugcOrigin": "DESKTOP",
            "versionTag": "0",
            "visibility": {
                "com.linkedin.ugc.MemberNetworkVisibility": "LOGGED_IN"
            }
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}

Requesting Playable Video Streams

UGC Posts of type video can be decorated through playableStreams to return playable video URLs. For example:

GET https://api.linkedin.com/v2/ugcPosts/urn%3Ali%3AugcPost%3A6382695519264866304?viewContext=AUTHOR&projection=(specificContent(com.linkedin.ugc.ShareContent(media(*(media~:playableStreams)))))

Common Retrieval Errors

The table below lists commonly encountered errors retrieving UGC Posts. It is not meant to be a comprehensive list of all possible UGC Post retrieval errors.

Code Message Description
400 Invalid query parameters passed to request Occurs when using Restli 2.0 with an HTTP client such as Postman that encodes the entire query param string. Try again with curl instead of Postman. See Protocol Version for more on Restli 2.0 encoding.
403 Not enough permissions to access: GET-authors /ugcPosts Indicates token used in the call has not been authorized with r_organization_social. Refer to Permissions for more information.

Delete UGC Posts

Note that URNs included in the URL params must be URL encoded. For example, urn:li:ugcPost:12345 would become urn%3Ali%3AugcPost%3A12345.

Sample Request

DELETE https://api.linkedin.com/v2/ugcPosts/{encoded ugcPostUrn|shareUrn}