Creating Company Shares

Use the Company Share API to share updates and content to company followers on behalf of a particular company. The LinkedIn member making the call must be an admin of the company on behalf of whom content is being shared.

For the purposes of testing, we've created a special LinkedIn Company Page that is available for all developers to use. This company page doesn't require the authenticated user making the API call to be an administrator of the company: https://www.linkedin.com/company/devtestco (Company ID 2414183)

Note: Anyone can view the share when posted to this test company (since its purpose is as a developer sandbox for any developer using the API). Please ensure not to provide any information in the company share that you wouldn't want to be publicly viewable

Usage

You must use an access token to make an authenticated call on behalf of a user.

Permissions

This API requires the following permission:

Permission Description
rw_company_admin Edit company pages for which I am an Admin, and post status updates on behalf of those companies

Posting Shares

POST
https://api.linkedin.com/v1/companies/{id}/shares

Input Fields

Node Parent Node Required Value Notes
share Yes Child nodes of share Parent node for all share content
comment share Conditional Text of company share content Post must contain comment and/or (content/titleand content/submitted-url). Max length is 700 characters.
content share Conditional Parent node for information on shared document  
title share/content Conditional Title of shared document Post must contain comment and/or (content/titleand content/submitted-url). Max length is 200 characters.
submitted-url share/content Conditional URL for shared content Post must contain comment and/or (title and submitted-url).
submitted-image-url share/content Optional URL for image of shared content 2MB max filesize. Invalid without (title and submitted-url).
description share/content Option Description of shared content Max length of 256 characters.
visibility share Yes Parent node for visibility information  
code share/visibility Yes One of anyone: all members or connections-only: connections only.  

Sample POST request bodies

Simple company share with only text:

JSON
{
    "visibility": { "code": "anyone" },
    "comment": "There are great career opportunities here at LinkedIn!"
}
XML
<share>
  <visibility>
    <code>anyone</code>
  </visibility>
  <comment>There are great career opportunities here at LinkedIn!</comment>
</share>

Full company share with content:

json
{
    "visibility": { "code": "anyone" },
    "comment": "Testing a full company share!",
    "content": {
       "submitted-­url": "https://www.example.com/content.html",
       "title": "Test Share with Content",
       "description": "content description",
       "submitted‐image-­url": "https://www.example.com/image.jpg"
    }
}
xml
<share>
  <visibility>
    <code>anyone</code>
  </visibility>
  <comment>Testing a full company share!</comment>
  <content>
    <submitted-­url>https://www.example.com/content.html</submitted-­url>
    <title>Test Share with Content</title>
    <description>content description</description>
    <submitted‐image-­url>https://www.example.com/image.jpg</submitted-­image-­url>
  </content>
</share>

Response

Returns 201 Created on success. It will also provide a Location HTTP header with a URL for the created resource. However, at this time, you cannot retrieve the Share from that location. It's there for future compatibility.

Resharing An Existing Share

When a company administrator does a reshare, they can pass along a previously shared item to their network. This can either be as-is, or they can annotate the share to provide their own thoughts. The process is similar to creating a new share, but you provide an attribution/id value instead of a content block.

You can only reshare a share with a content block. If this block is empty, you will get a 400 error saying "Specified share {s28311617} has no content".

Permission Checking

You can check to see if a company has shares enabled (this is on by default):

GET
https://api.linkedin.com/v1/companies/{id}/is-company-share-enabled

You can also check to see if the current viewer is an administrator for a company (so they can share):

GET
https://api.linkedin.com/v1/companies/{id}/relation-to-viewer/is-company-share-enabled

Alternatively, you can make a single call to fetch a list of all companies the current user is an administrator of. If the authenticated user is an admin of more than 10 companies, use the start and count parameters:

GET
https://api.linkedin.com/v1/companies?is-company-admin=true&start=0&count=15