- The
post
field accepts up to 3,000 characters. - LinkedIn will automatically preview the link in the post unless there is an image or video
included. In the above example the image will show. Removing the image will cause the link
preview to show. If the link preview cannot be retrieved, the post will still be published and a
linkPreviewFailed: true
field will be returned in the /post response. - Hashtags are clickable in LinkedIn. Use the # symbol to specify a LinkedIn hashtag.
- If publishing a video and doesn’t end in a known video extension such as mp4, please use the
isVideo
parameter. See the /post endpoint for details. - LinkedIn video processing takes several minutes to complete. Please wait before trying the share URL or getting video analytics.
- LinkedIn limits 150 posts per day per LinkedIn account.
- Posting to LinkedIn Groups is not supported.
- LinkedIn also supports sending media without post text. If you do not want post text included
send an empty String
post: ""
. - You may link either a company page or a personal LinkedIn account.
- See LinkedIn Media Guidelines and LinkedIn Authorization for more information.
You must be a “Super Admin” or a “Content Admin” to connect a LinkedIn company page.
Posting to LinkedIn
JSON for a basic post with a link and image to LinkedIn:LinkedIn Post
LinkedIn Options
You can set additional options for a post by using thelinkedInOptions
parameter.
LinkedIn Options
The alternative text of images for accessibility and screen readers.See LinkedIn Alternative Text for more information.
Disable the ability for users to reshare the LinkedIn post.See LinkedIn Disable Share for more information.
Target your organic posts to specific groups by countries, industry, job title, and more.Requires at least 300 followers in the targeted audience.See LinkedIn Audience Targeting for more information.
The thumbnail of a video. Must be PNG or JPG, same dimensions as video, under 10MB. URL should end in .png or .jpg.See LinkedIn Video Thumbnail for more information.
The title of a document when posting PPT, PPTX, DOC, DOCX, or PDF files. Maximum length: 400 characters.If not specified, the filename is used.See LinkedIn Documents for more information.
Title or media captions to LinkedIn images or videos.Each title corresponds to a media URL in order.See LinkedIn Media Titles for more information.
The visibility of the post.Values:
public
, connections
, or loggedin
.See LinkedIn Post Visibility for more information.Alternative Text
Add LinkedIn alternative text, also known as LinkedIn alt text, to a LinkedIn image. LinkedIn alt text is an accessibility feature used for additional user info and screen readers. LinkedIn does not support altText on videos or documents. Use thealtText
in the linkedInOptions
object.
LinkedIn Alt Text
mediaUrls
array. The alt text will be applied to each image in order.
Audience Targeting
LinkedIn allows you to target your organic posts to specific groups of users. You can target by countries, industry, job title, and more.LinkedIn targeting requires at least 300 followers in the targeted audience. For example if
you have 400 followers and target just users in the country US, but only 200 of your followers are
in the US, the targeting will fail since the audience is too small.
targeting
object in the linkedInOptions
object:
LinkedIn Audience Targeting
- LinkedIn Countries
- LinkedIn Seniorities
- LinkedIn Degrees
- LinkedIn Fields of Study
- LinkedIn Industries
- LinkedIn Job Functions
- LinkedIn Staff Count Ranges
Authorization Refresh
LinkedIn must be reauthorized every year via the Social Accounts page.- An email and webhook social action notification will be sent 15 days in advance of authorization expiration.
- The refresh required date and remaining days can be retrieved from the /user endpoint.
- The user will see on their social account linkage page an alert and a refresh button 30 days prior to expiration.
Character Limits
Please see LinkedIn Character Limits for more information.Disable Share
You can disable the ability for users to reshare the LinkedIn post by setting thedisableShare
field to true
in the linkedInOptions
object:
LinkedIn Disable Share
Documents
Use the API to post a document on LinkedIn. Supported file formats include: PPT, PPTX, DOC, DOCX, and PDF. Ensure the document is under 100MB in size and does not exceed 300 pages. Below is a code sample demonstrating how to post a PPTX document with a title:LinkedIn Document Post
LinkedIn Mentions
You may mention other LinkedIn organizations, i.e. company pages, or member profiles, i.e. individual profile pages, in your posts. Ayrshare makes an attempt to resolve the @mention by doing a lookup on the handle. If the @mention is not found, the @ will be removed from the post since LinkedIn will not accept posts with unresolved mentions. Individual LinkedIn profiles cannot be mentioned.If any mention in a LinkedIn post cannot be resolved (due to privacy settings,
account restrictions, or other platform limitations), LinkedIn may fail to
render all mentions in that post as clickable links. This is LinkedIn’s platform
behavior and not an API issue. To avoid this, ensure all mentioned users and
organizations allow mentions from your organization or consider posting mentions
separately to isolate any problematic mentions.
Organization Profiles
Mention another LinkedIn organization handle by adding@handle
in the post text. The @handle
is the name of the company or organization.
You can mention in posts, comments, and reply to comments.
For example,
- Ayrshare’s LinkedIn company profile is https://www.linkedin.com/company/ayrshare and the handle used would be @ayrshare.
- Zara’s LinkedIn company profile is https://www.linkedin.com/company/zara-sa/ and the handle used would be @zara-sa.
LinkedIn Mention
Member Profiles
Mention another LinkedIn member profile by adding@vanity_name
or @[John Smith]
in the post text.
@vanity_name
is the vanity name of the member profile. For example in the member’s profile URLhttps://www.linkedin.com/in/vanity_name/
, the vanity name isvanity_name
.@[John Smith]
is the person’s full name. For example if the person’s full name isJohn Smith
, the mention would be@[John Smith]
.
LinkedIn Mention
- You must have a LinkedIn company page connected to your Ayrshare account to mention member profiles. If you connect your own personal LinkedIn account, you will not be able to mention other people’s profiles.
- LinkedIn only allows mentioning people who follow your organization / company page.
Media Titles
Add title or media captions to LinkedIn images or videos. Use thetitles
in the linkedInOptions
object.
LinkedIn Media Titles
mediaUrls
array. The title will be applied to each image or video in order.
Multi Image Posts
You may post up to 9 image URLs in themediaUrls
to LinkedIn.
LinkedIn Multi Image Post
Post Visibility
LinkedIn allows you to control the visibility of your posts. You can set the visibility to public, connections only, or loggedin users only. If no visibility is specified, the post will be “public” and visible to all LinkedIn users.public
: The post will be visible to all LinkedIn users. Available for both company pages and personal LinkedIn connected accounts. Default if no visibility is specified.connections
: The post will be visible to the 1st degree network of the owner (user profile). Available for personal LinkedIn connected accounts only.loggedin
: The post will be visible to logged in LinkedIn users only. Available for both company pages and personal LinkedIn connected accounts.
visibility
field in the linkedInOptions
object:
LinkedIn Post Visibility
Video Publishing Permissions
On LinkedIn, only users with specific permissions can publish videos to company pages:- Users with Admin permissions.
- Users with Direct Sponsored Content (DSC) permissions.
Video Thumbnail
Set a LinkedIn thumbnail for a video. Send a remote URL of a PNG or JPG file that is the same dimensions as the video and less than 10 MB. URL should end in .png or .jpg. Use thethumbNail
in the linkedInOptions
object.
LinkedIn Video Thumbnail