Share via


Posts API

Try in Postman

The DMA Posts API returns posts given post urns (urn:li:share, urn:li:ugcPost, urn:li:groupPost). DMA Posts API only supports BATCH_GET.

The service currently provides the following methods:

  • BATCH_GET - List of post contents for the given set of ids (urn:li:share or urn:li:ugcPost, urn:li:groupPost)

Post example

Refer to an image below for a Post example on LinkedIn Feed.

Post example on Feed

Permissions

Permission Description
r_dma_admin_pages_content Retrieve your organization’s posts, comments, reactions, and other engagement data. Retrieve your organization’s pages and their reporting data (including follower, visitor and content analytics). Restricted to organizations in which the authenticated member has one of the following company page roles.
  • ADMINISTRATOR
  • CONTENT_ADMINISTRATOR

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

Access

An organizational admin can access a post through this API if one of the following is true:

  • The post was created by that organization/organizationalPage
  • The post is a reshare of a post created by the organization/organizationalPage.

If a non-authorized viewer tries to access posts, the API will throw 403 with a hard-coded public URL to posts (e.g. https://linkedin.com/feed/update/urn:li:share:932025032 or https://linkedin.com/feed/update/urn:li:ugcPost:89582953243234)

Member Data Obfuscation

Some fields may be removed based on the member's DMA privacy settings. The fields in the right column will be removed if the PersonUrn in the field on the left does not consent to having their data shared from this endpoint.

Member Field Fields to Remove
created:(actor) created:(actor)
created:(impersonator) created:(impersonator)
lastModified:(actor) lastModified:(actor)
lastModified:(impersonator) lastModified:(impersonator)
commentary:(attributes:(value:(person:(person)))) commentary:(attributes:(value:(person:(person))))
content:(celebrationContent:(recipients[i]) content:(celebrationContent:(recipients[i])
content:(celebrationContent:(taggedentities[i]) content:(celebrationContent:(taggedentities[i])
content:(mediaContent:(taggedentities[i]) content:(mediaContent:(taggedentities[i])

Additionally, if the container field is not an EmployeeBroadcastFeedUrn then the commentary, content, contentLandingPage, and contentCallToActionLabel fields will be removed if the created:(actor) was removed.

Post Schema

Field Format Description Required
adContext AdContext The advertising context representing the ads specific metadata (which is related to ads or viral tracking, rendering, etc.), associated with the post. The current usage is for viral posts created from an ad and dark posts. If not set, then the post does not have ad specific metadata. optional
commentary little text The user generated commentary for the post. required
container URN Container Entity URN that contains user generated content. If not set, the post does not belong to a container. optional
content Content The posted content (if any, e.g., video). Optional content indicates a post with only commentary. optional
contentCallToActionLabel Type of ContentCallToActionLabel which has the values of:
  • APPLY - Call To Action button on the creative shows 'Apply'.
  • DOWNLOAD - Call To Action button on the creative shows 'Download'.
  • VIEW_QUOTE - Call To Action button on the creative shows 'View Quote'.
  • LEARN_MORE - Call To Action button on the creative shows 'Learn More'.
  • SIGN_UP - Call To Action button on the creative shows 'Sign Up'.
  • SUBSCRIBE - Call To Action button on the creative shows 'Subscribe'.
  • REGISTER - Call To Action button on the creative shows 'Register'.
  • JOIN - Call To Action button on the creative shows 'Join'.
  • ATTEND - Call To Action button on the creative shows 'Attend'.
  • REQUEST_DEMO - Call To Action button on the creative shows 'Register Demo'.
  • SEE_MORE - Call To Action button on the creative shows 'See More'.
  • The call to action label which a member can act upon that is associated with the content. If empty, there is an optional call to action associated with the content. optional
    contentLandingPage URL Web page that is opened when the member clicks on the associated content. For example, clicking on an image and then linking and taking the user to an associated web page. If empty, no landing page associated with the content. This field is ignored in Campaign Manager UI for article ads and does not map to "Destination URL" field. Required if the campaign creative has the WEBSITE_VISIT objective - otherwise optional
    created AuditStamp Time at which the resource was created in milliseconds since epoch. optional
    distribution Distribution Distribution of the post both in LinkedIn and externally required
    id UserGeneratedContentPostUrn or ShareUrn or groupPostUrn Unique ID for the object required
    isReshareDisabledByAuthor boolean default=false Indicates whether resharing of the post has been disabled by the author. If this field is set to true, the post cannot be reshared in any context. If false, other reshare restrictions may still apply due to the post's visibility, container, or content type. optional
    lastModified AuditStamp Time at which the resource was last modified in milliseconds since epoch. read-only
    lifecycleState Enum string The state of the content. PUBLISHED is the only accepted field during creation. The following values can be returned in responses:
  • DRAFT - Represents content that is accessible only to the author and is not yet published.
  • PUBLISHED - Represents content that is accessible to all entities. This is the only accepted field during creation.
  • PUBLISH_REQUESTED - Represents content that has been submitted for publishing but is not yet ready for rendering. The content will be published asynchronously once the processing has successfully completed.
  • PUBLISH_FAILED - Represents content that has been submitted for publishing but was not processed. An edit is required in order to re-attempt publishing.
  • required
    lifecycleStateInfo LifecycleStateInfo Additional information about the lifecycle state for PUBLISH_REQUESTED or PUBLISH_FAILED. optional
    publishedAt long The time at which the content was published represented in epoch time. Optional
    scheduledAt long The time at which the content is scheduled to be published represented in epoch time. Optional
    reshareContext ReshareContext The context in which the post was re-shared - only set for re-shares
  • parent: URN type the direct parent of the post (i.e.,the post that was re-shared).
  • root: The greatest ancestor of the post - may also be the parent. This field is derived from the parent and supports the same URN types.
  • optional
    scheduledAt Time The time at which this post is scheduled to be published. Empty if never scheduled. optional
    visibility MemberNetworkVisibility Visibility restrictions on content. Type of 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.
  • CONTAINER - Visibility is delegated to the owner of the container entity. For example, posts within a group are delegated to the groups authorization API for visibility authorization.
  • required

    AuditStamp

    Field Format Description Required
    actor URN The entity authorized the change. optional
    impersonator URN The entity which performs the change on behalf of the actor. Must be authorized to act as the actor. optional
    time Time When the event/action happened in epoch time. optional

    AdContext

    Field Format Description Required
    isDsc boolean Whether or not this post is DSC. A posted DSC is created for the sole purpose of sponsorship. optional

    Content

    Field Format Description
    media MediaContent Details of the Media content such as Image, Video
    poll PollContent Details of Poll content (can only be non-sponsored)
    multiImage MultiImageContent Details of MultiImage content (can only be non-sponsored)
    article ArticleContent Details of Article content (can be either non-sponsored or sponsored)
    carousel CarouselContent Details of Carousel content (Can only be sponsored)
    celebration CelebrationContent Details of Celebration contents
    reference ReferenceContent Details of Reference content such as linkedInArticle, etc.

    Reference

    Field Format Description
    id URN The URN of the reference that represents a reference such as an event, linkedInArticle (e.g. urn:li:linkedInArticle:123), etc.

    Media

    Field Format Description
    media one of Image, Video or Document Media details about image, video or document
    title String Optional The media title. No title if empty.
    altText String Optional The alternate text for the media. None if empty.
    taggedEntities Array of TaggedEntity Optional. Tagged entities on media content

    Celebration

    Field Format Description
    text String Optional. optional text on celebration content
    image Image Optional. Media details about image. Null if celebrationTemplate was used instead.
    celebrationTemplate CelebrationTemplateUrn The LinkedIn provided celebration template this Celebration was created with. This is null if the user provided an image instead.
    type celebrationType enum Specific celebration content type
  • CELEBRATE_WELCOME - Welcome a new member to the team
  • CELEBRATE_ANNIVERSARY - Celebrate a job anniversary
  • CELEBRATE_AWARD - Celebrate an award or honor
  • CELEBRATE_EVENT-Celebrate a team event, such as an offsite or dinner
  • CELEBRATE_GRADUATION - Celebrate a graduation
  • CELEBRATE_JOB_CHANGE - Celebrate a job change
  • CELEBRATE_KUDOS - Celebrate appreciation by giving kudos
  • CELEBRATE_LAUNCH - Celebrate a product or project launch
  • CELEBRATE_CAREER_BREAK - Celebrate a career break
  • CELEBRATE_CERTIFICATE - Celebrate a certificate
  • CELEBRATE_EDUCATION - Celebrate an education
  • CELEBRATE_MILESTONE - Celebrate a milestone or achievement
  • recipients Array of URNs Optional. Recipients of celebration content specified by author.
    taggedEntities Array of URNs Optional. Tagged entities on celebration content.

    TaggedEntity

    Field Format Description
    entity URN The URN of the entity the tag is linked with
    type TaggedEntityType
  • PHOTO_TAG - The tagged entity is a photo tag
  • TAP_TARGET - The tagged entity is a tap target
  • STICKER_LINK_TAG - The tagged entity is a sticker link tag - DEPRECATED
  • position PercentageOffsetRectangle Optional. Location info of taggedEntity on the media
    template TaggedEntityTemplate Optional. Template size of the taggedEntity
  • SMALL - small template
  • MEDIUM - medium template
  • LARGE - large template
  • Distribution

    Field Format Description
    feedDistribution feedDistribution type Specifies the feeds distributed to within LinkedIn.
  • NONE-Do not distribute within LinkedIn via feed.
  • MAIN_FEED-Distribute to the flagship feed, and container entity feed if applicable.
  • targetEntities Optional target Intended audience for this post. The target entities targeted for distribution. The distribution is an OR of the targets in the array.
    thirdPartyDistributionChannels Optional External distribution channels that this post is distributed to (e.g., Twitter, Tencent, Weibo). Empty array indicates the post is not externally distributed.

    TargetEntities

    Field Format Description
    degrees Array of Degree URN Standardized degrees to be targeted.
    fieldsOfStudy Array of FieldOfStudy URN Standardized fields of study to be targeted.
    industries Array of Industry URN Industries to be targeted.
    interfaceLocales Array of Locale Interface locales to be targeted.
    jobFunctions Array of Function URN Top level groupings of super titles to be targeted.
    locations Array of Location URN Deprecated. Use geoLocations field instead for the targeting location. URNs can be: countryGroup, country, state, and region
    geoLocations Array of Geo URN Learn more GeoLocations for targeting.
    organizations Array of Organization URN School organizations for targeting. You can retrieve a school organization URN using the Organization Lookup API
    seniorities Array of Seniority URN Seniorities to be targeted
    staffCountRanges Array of StaffCountRange Organization sizes for targeting. Consists of 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
  • LifecycleStateInfo

    This section provides additional information about the lifecycle state.

    Field Format Description
    contentStatus optional ProcessingState Status for post content. If absent, then state does not wait for content processing. PENDING, PROCESSING, and FAILED are available values. If processing completes UGC transitions to PUBLISHED and the contentStatus is null.
    isEditedByAuthor boolean default=false Indicates whether a post was edited by the author after publishing. Applicable for UserGeneratedContentLifecycleState value of PUBLISHED only.
    reviewStatus optional ProcessingState Review status of the post. If not present, then the state does not wait upon review. PENDING, PROCESSING, and FAILED are the possible values for this field. If processing completes the UGC transitions to PUBLISHED and reviewStatus is null. Applicable for lifecycle state values of PUBLISH_REQUESTED and PUBLISHED_FAILED only.

    How to Obtain Post IDs

    Post IDs (URNs) are required to retrieve post data using the DMA Posts API. You can obtain these URNs through the DMA Feed Content API or by manually extracting them from LinkedIn page sources.

    Sample Request

    GET https://api.linkedin.com/rest/dmaFeedContentsExternal?author=List(urn%3Ali%3Aorganization%3A{ID})&maxPaginationCount={MAX_PAGINATION_COUNT}&q=postsByAuthor
    

    Description: Retrieves a list of post URNs (urn:li:share, urn:li:ugcPost, urn:li:groupPost) authored by the specified organization.

    Sample Response

    {
        "paging": {
            "start": 0,
            "count": 10,
            "links": [],
            "total": 6
        },
        "metadata": {},
        "elements": [
            {
                "id": "urn:li:share:{ID1}"
            },
            {
                "id": "urn:li:ugcPost:{ID2}"
            },
            {
                "id": "urn:li:ugcPost:{ID3}"
            },
            {
                "id": "urn:li:ugcPost:{ID4}"
            },
            {
                "id": "urn:li:ugcPost:{ID5}"
            },
            {
                "id": "urn:li:share:{ID6}"
            }
        ]
    }
    

    Query Parameters

    Field Name Type Description Required Example
    author Organization URN Your organization's URN identifier. You can find it in the URL when viewing your organization page on LinkedIn (e.g., linkedin.com/company/{ID}). Required urn:li:organization:{ID}
    maxPaginationCount Integer The maximum number of posts to retrieve per request. This value must be between 1 and 100. Start with a smaller value (e.g., 10-50) for testing, and adjust based on your needs. Note that larger values may result in longer response times. Required 10
    q String Query type for the finder method. Required postsByAuthor

    The response includes:

    • paging: Pagination information including the total count of posts available
    • elements: An array of post URNs that can be used with the BATCH_GET endpoint below to retrieve full post details

    Batch Get a collection of posts

    BATCH_GET

    Sample Request

    GET https://api.linkedin.com/rest/dmaPosts?ids=List(encoded shareUrn, ugcPostUrn, groupPostUrn)&viewContext=READER
    

    Sample Response

    {
        "statuses": {
            "urn:li:ugcPost:7125926656950550528": 200,
            "urn:li:share:7988932514512997214": 200
        },
        "results": {
        	"urn:li:share:7988932514512997214": {
            	"lastModified": {
                    "actor": "urn:li:person:C-eUkhGs6q",
                    "time": 1698953310455
                },
                "created": {
                    "actor": "urn:li:person:C-eUkhGs6q",
                    "time": 1698953310455
                },
                "isReshareDisabledByAuthor": false,
                "lifecycleState": "PUBLISHED",
                "visibility": "PUBLIC",
                "publishedAt": 1698953310455,
                "id": "urn:li:ugcPost:7125926656950550528",
                "distribution": {
                    "feedDistribution": "MAIN_FEED",
                    "thirdPartyDistributionChannels": []
                },
                "lifecycleStateInfo": {
                    "isEditedByAuthor": false
                }
            },
            "urn:li:ugcPost:7125926656950550528": {
            	"lastModified": {
                    "actor": "urn:li:person:C-eUkhGs6q",
                    "time": 1698953310455
                },
                "created": {
                    "actor": "urn:li:person:C-eUkhGs6q",
                    "time": 1698953310455
                },
                "isReshareDisabledByAuthor": false,
                "lifecycleState": "PUBLISHED",
                "visibility": "PUBLIC",
                "publishedAt": 1698953310455,
                "id": "urn:li:ugcPost:7125926656950550528",
                "distribution": {
                    "feedDistribution": "MAIN_FEED",
                    "thirdPartyDistributionChannels": []
                },
                "lifecycleStateInfo": {
                    "isEditedByAuthor": false
                }
            }
        },
        "errors": {}
    }
    

    Query Parameters

    Field Name Type Description Required Example
    ids Set of Urns Set of Urn to fetch posts. Only accepts urn:li:share, urn:li:ugcPost, urn:li:groupPost. Required List(urn%3Ali%3Ashare%3A{ID1},urn%3Ali%3AugcPost%3A{ID2})
    viewContext enum READER or AUTHOR - Default=READER The viewContext in which you are looking at the posts. Use AUTHOR when viewing post as the author of the post or viewing draft posts like scheduled unpublished post or ad post in review and READER when viewing post as the a non-author. Optional READER

    API Error Details

    HTTP Status Code Error Message Description Error Resolution
    401 EMPTY_ACCESS_TOKEN Empty or expired OAuth2 access token Make sure you provide valid OAuth2 access token
    403 ACCESS_DENIED Not enough permissions to access this endpoint Make sure your developer application is provisioned with this endpoint
    404 NOT_FOUND Resolved url not found Verify the provided id is correct
    500 INTERNAL_SERVER_ERROR Internal server side error N/A