Group Posts and their Social Actions

Note

Usage of this API is restricted to approved partners, subject to limitations via API agreement.

LinkedIn's Group Posts and their Social Actions rely on the following APIs:

Utilizing UGC Post API for Groups

All Group posts will contain a group URNin the containerEntityfield. Group posts are represented as groupPost URN.

Create a Group Post

POST

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

sample request body

{
    "author": "urn:li:person:123ABC", 
    "containerEntity": "urn:li:group:123", 
    "lifecycleState": "PUBLISHED", 
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "media": [
                {
                    "description": {
                        "attributes": [], 
                        "text": "Check out our awesome group!"
                    }, 
                    "status": "READY", 
                    "thumbnails": [], 
                    "title": {
                        "attributes": [], 
                        "text": "Group Post!"
                    }
                }
            ], 
            "shareCommentary": {
                "attributes": [], 
                "text": "Some group text"
            }
        }
    }, 
    "visibility": {
        "com.linkedin.ugc.MemberNetworkVisibility": "CONTAINER"
    }
}

Retrieving Group Posts

You can either:

Utilizing Social Actions APIs for Groups

All Group social actions will be retrieved the same way as any other social actions. Simply use the Social Actions API with the groupPostUrn.

Utilizing Compliance Events API for Group Content

All Group content activities involving posts and social actions made by a regulated member will appear on Compliance Events API. It will be surfaced through the resourceName:

  • ugcPosts  - will contain containerEntity
  • socialActions  - will be ugcPostUrnthat links to a group post

Group content activities made by non-regulated members within a group owned by a regulated member are currently not captured through Compliance Events. Please use UGC Posts and Social Actions APIs to retrieve this information.

ID Migration from V1 to V2

Group Post

  • V1 format:  g-{groupID}-S-{postID}
  • V2 format:  urn:li:groupPost:{groupID}-{postID}

Group Comment

  • V1 format:  g-{groupID}-S-{postID}-{commentID}
  • V2 format: urn:li:comment:(urn:li:groupPost:{groupID}-{postID},{commentID})