How to create Polls on LinkedIn

Viewed 86

I was able to successfully create regular Text, Image and Video Shares on LinkedIn using the Shares API.

Now, I also need to create Polls on LinkedIn and I've searched so much around but can't seem to find any documentations on how to do that using the Shares API.

Does LinkedIn support creating Polls programmatically? If yes, can anyone suggest API documentations for this?

Thanks.

1 Answers

LinkedIn recently added a possibility to create polls with their Posts API.

The details are on a dedicated page, but the gist is this payload:

POST https://api.linkedin.com/rest/posts
{
 "author": "urn:li:organization:2414183",
 "commentary": "test poll",
 "visibility": "PUBLIC",
 "distribution": {
   "feedDistribution": "MAIN_FEED",
   "targetEntities": [],
   "thirdPartyDistributionChannels": []
 },
 "lifecycleState": "PUBLISHED",
 "isReshareDisabledByAuthor": false,
 "content": {
     "poll": {
       "question" :"What is your favorite color?",
       "options" : [ { "text" : "Red" }, { "text" : "Blue" }, {"text": "Yellow"}, {"text": "green"} ],
       "settings" : { "duration" : "THREE_DAYS" }
     }
 }
}
Related