Skip to content

REST API v1 · Resource

LinkedIn

Draft, schedule and publish LinkedIn posts and events, and read page insights.

API reference · LinkedIn

Last updated

Endpoints

Paths are relative to https://fliok.com/api/v1. Each endpoint names the scope and the lowest key role it needs; a key without them gets 403 (see Authentication).

LinkedIn is a paid add-on on the Basic plan and up. Connect LinkedIn in Integrations first: it is a browser sign-in, so it can’t be done with a key (GET /integrations/linkedin gives the connectUrl to open). These endpoints then run the same code as the dashboard, with the same roles, rules and limits. Reads need any key; drafts, comments and likes need the agent role; scheduling, publishing, retrying and deleting what isn’t a draft need admin.

  • The add-on. Without it, every write answers 402 linkedin_addon_required, with offer saying what the workspace owner can buy in Plan & billing. Reading your posts and events stays open, as in the dashboard. Page insights and comments need the add-on to read too.
  • What LinkedIn approved. Events, and page insights and comments, work only when LinkedIn has approved them for Fliok. Until then events answer 404 not_found, and insights and comments answer as the dashboard does. Page insights and comments also need your company page picked in Integrations.
  • Files by URL. POST /linkedin/media downloads a photo (JPG, PNG or GIF, up to 10 MB), an MP4 video or a PDF, PPTX or DOCX (up to 100 MB) from a public https:// address and checks it like a dashboard upload. Private and internal addresses are refused. Pass the mediaId in a post’s media, an article’s thumbnailKey or an event’s imageKey.
  • Not in the API. Connecting and picking the company page are browser sign-ins. LinkedIn Live is read-only here (GET /linkedin/live): scheduling a Live and its stream keys stay in the dashboard, so a key never sees a stream address. Member data and page data stay in the dashboard for now. LinkedIn ads have their own page.

LinkedIn

19
  • GET/linkedin/postsLinkedIn posts written in Fliok: drafts, scheduled, publishing, published, failed and cancelled, newest first. Filter with ?status=Scope linkedin:read · viewer role or higher
  • POST/linkedin/postsSave a draft (agent keys), or schedule or publish now (admin keys): text, photos, video, document, article link or poll, as you or your pageScope linkedin:write · agent role or higher
  • GET/linkedin/posts/{id}One LinkedIn post written in Fliok. Poll it after publishing: publishing turns into published (with a permalink) or failed (with the reason)Scope linkedin:read · viewer role or higher
  • PATCH/linkedin/posts/{id}Edit a post, or move it with action draft, schedule, publish or cancel. Agent keys edit drafts; anything that schedules or publishes needs an admin keyScope linkedin:write · agent role or higher
  • DELETE/linkedin/posts/{id}Delete a post. Agent keys delete drafts; others need an admin key. A published post is deleted on LinkedIn firstScope linkedin:write · agent role or higher
  • POST/linkedin/posts/{id}/retryTry a failed post again now (admin keys). Files already sent to LinkedIn are kept, so nothing is uploaded twiceScope linkedin:write · admin role or higher
  • GET/linkedin/eventsLinkedIn events kept in Fliok: drafts, made on LinkedIn, shared. Upcoming first, then past ones. 404 when LinkedIn events are not availableScope linkedin:read · viewer role or higher
  • POST/linkedin/eventsSave an event as a draft (agent keys), or make it on LinkedIn now with action create and share it at once (admin keys)Scope linkedin:write · agent role or higher
  • GET/linkedin/events/{id}One LinkedIn event with its share post. Poll it after sharing to see the post go outScope linkedin:read · viewer role or higher
  • PATCH/linkedin/events/{id}Change a draft event, put it on LinkedIn with action create, or change one on LinkedIn (admin keys, once shared and before it starts)Scope linkedin:write · agent role or higher
  • DELETE/linkedin/events/{id}Delete a draft event (agent keys), or a shared one by deleting its post on LinkedIn (admin keys)Scope linkedin:write · agent role or higher
  • POST/linkedin/events/{id}/shareShare an event as a LinkedIn post, which makes it visible. Agent keys save a draft; admin keys post now or schedule itScope linkedin:write · agent role or higher
  • POST/linkedin/events/syncBring in the connected member’s own events from LinkedIn, so events made outside Fliok show up tooScope linkedin:write · agent role or higher
  • GET/linkedin/insightsYour company page’s followers, page views and post numbers per day for 7, 30 or 90 days. Needs a picked page and LinkedIn’s page featuresScope linkedin:read · viewer role or higher
  • GET/linkedin/commentsYour company page’s recent posts with comment counts, or one post’s comments as threads with ?post=. Needs LinkedIn’s page featuresScope linkedin:read · viewer role or higher
  • POST/linkedin/commentsComment, reply, like or unlike as your company page (agent keys and up). Every call is one comment; Fliok never comments by itselfScope linkedin:write · agent role or higher
  • DELETE/linkedin/commentsDelete a comment your company page wrote, with ?post= and ?comment= (admin keys)Scope linkedin:write · admin role or higher
  • GET/linkedin/liveYour LinkedIn Lives from the separate Live app: the pages and up to 50 Lives with their status. Never a stream address. 404 when Live is offScope linkedin:read · viewer role or higher
  • POST/linkedin/mediaGive Fliok a photo, MP4 video or PDF/PPTX/DOCX by public https:// link. It is checked like a dashboard upload; you get a mediaId for posts and eventsScope linkedin:write · agent role or higher

Request bodies

What these endpoints take, field by field. A body that doesn’t match answers 400 naming the field.

POST /linkedin/posts

JSON body. A draft may be unfinished; scheduling and publishing check every LinkedIn rule first (422 invalid_post lists what is wrong). Optional `Idempotency-Key`.

FieldTypeWhat it is
kindrequiredstringtext, image, multi_image (2–20 photos), video, document, article (a link) or poll.
textstringThe post’s words, up to 3,000 characters.
mediastring[]mediaIds from POST /linkedin/media, in order: one photo, 2–20 photos, one video or one document.
titlestring | nullA document’s title (needed) or a video’s (optional).
articleobject | nullFor kind article: { url, title, description?, thumbnailKey? } — thumbnailKey is a photo’s mediaId.
pollobject | nullFor kind poll: { question (up to 140), options (2–4, up to 30 characters each), durationDays (1, 3, 7 or 14) }.
visibilitystringPUBLIC (default) or CONNECTIONS. A company page’s posts are always PUBLIC.
actionstringdraft (default, agent keys), schedule or publish (admin keys).
postAsstringmember (default, the connected person) or page (your company page, when it can post).
scheduledAtstringWith action schedule: ISO 8601 with a zone, 2 minutes to 75 days ahead.

Returns 201 { post }. After publish, poll GET /linkedin/posts/{id}: status publishing turns into published (with permalink) or failed (with errorMessage).

PATCH /linkedin/posts/{id}

JSON body; send only what changes. A post LinkedIn is posting or has posted can’t be changed (409). Agent keys edit drafts; anything that schedules, publishes, cancels or changes a scheduled post needs an admin key.

FieldTypeWhat it is
kindstringtext, image, multi_image (2–20 photos), video, document, article (a link) or poll.
textstringThe post’s words, up to 3,000 characters.
mediastring[]mediaIds from POST /linkedin/media, in order: one photo, 2–20 photos, one video or one document.
titlestring | nullA document’s title (needed) or a video’s (optional).
articleobject | nullFor kind article: { url, title, description?, thumbnailKey? } — thumbnailKey is a photo’s mediaId.
pollobject | nullFor kind poll: { question (up to 140), options (2–4, up to 30 characters each), durationDays (1, 3, 7 or 14) }.
visibilitystringPUBLIC (default) or CONNECTIONS. A company page’s posts are always PUBLIC.
postAsstringmember (default, the connected person) or page (your company page, when it can post).
scheduledAtstringWith action schedule: ISO 8601 with a zone, 2 minutes to 75 days ahead.
actionstringdraft (unschedule), schedule, publish (now) or cancel (a scheduled post).

Returns 200 { post }.

POST /linkedin/media

JSON body. Fliok downloads the file, follows up to three redirects (each checked), and checks its first bytes against its type. Optional `Idempotency-Key`.

FieldTypeWhat it is
urlrequiredstringA public https:// link to the file.
typestringimage (default: JPG, PNG or GIF, up to 10 MB), video (MP4, up to 100 MB) or document (PDF, PPTX or DOCX, up to 100 MB).

Returns 201 { media: { mediaId, mime, size, kind } }. 413 file_too_large, 415 unsupported_media_type, 400 url_not_allowed for a private address.

POST /linkedin/events

JSON body. A draft is kept in Fliok (agent keys). action create makes it on LinkedIn now (admin keys); an event is only visible once it is shared as a post. Optional `Idempotency-Key`.

FieldTypeWhat it is
typerequiredstringonline or in_person.
namerequiredstringUp to 75 characters.
descriptionstringUp to 5,000 characters.
startsAtrequiredstringLocal time in timeZone, like "2026-12-01T15:30". At least 10 minutes ahead, within a year.
endsAtrequiredstringLocal time in timeZone. An event lasts at most 14 days.
timeZonerequiredstringAn IANA zone, like "Asia/Kolkata".
urlstringOnline events: the https:// link people join at.
addressobject | nullIn-person events: { line1, city, geographicArea, postalCode, country }.
venueDetailsstringIn-person events: how to find the room, up to 1,000 characters.
imageKeystring | nullA JPG or PNG photo’s mediaId from POST /linkedin/media, shown as the event’s cover.
actionstringdraft (default) or create.
shareobject | nullWith create: { text, visibility } to share it as a post at once.

Returns 201 { event }.

PATCH /linkedin/events/{id}

JSON body; send only what changes. LinkedIn takes changes to an event only after it is shared and before it starts (`changeable` on the event).

FieldTypeWhat it is
typestringonline or in_person.
namestringUp to 75 characters.
descriptionstringUp to 5,000 characters.
startsAtstringLocal time in timeZone, like "2026-12-01T15:30". At least 10 minutes ahead, within a year.
endsAtstringLocal time in timeZone. An event lasts at most 14 days.
timeZonestringAn IANA zone, like "Asia/Kolkata".
urlstringOnline events: the https:// link people join at.
addressobject | nullIn-person events: { line1, city, geographicArea, postalCode, country }.
venueDetailsstringIn-person events: how to find the room, up to 1,000 characters.
imageKeystring | nullA JPG or PNG photo’s mediaId from POST /linkedin/media, shown as the event’s cover.
actionstringcreate: put a draft on LinkedIn (admin keys).
shareobject | nullWith create: { text, visibility } to share it at once.

Returns 200 { event }.

POST /linkedin/events/{id}/share

JSON body. The share goes through the posts pipeline, so it shows in GET /linkedin/posts too. Optional `Idempotency-Key`.

FieldTypeWhat it is
textstringThe post’s words.
visibilitystringPUBLIC (default) or CONNECTIONS.
actionstringpublish (default) or schedule (admin keys), or draft (agent keys).
scheduledAtstringWith schedule: ISO 8601 with a zone.

Returns 200 { event } with share { postId, status, scheduledAt, permalink, errorMessage }.

POST /linkedin/comments

JSON body. Everything is done as your company page. Optional `Idempotency-Key`, so a retried comment isn’t posted twice.

FieldTypeWhat it is
actionrequiredstringcomment, reply, like or unlike.
postUrnrequiredstringThe page post, like "urn:li:share:7…" (from GET /linkedin/comments).
commentUrnstringreply: the comment answered (needed). like / unlike: a comment instead of the post.
textstringcomment and reply: 1–1,250 characters.

Returns 200 { done: true }.

Examples

Post a photo on LinkedIn

curl -X POST "https://fliok.com/api/v1/linkedin/media" \
  -H "Authorization: Bearer wa_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://cdn.example.com/diwali-offer.jpg", "type": "image" }'

curl -X POST "https://fliok.com/api/v1/linkedin/posts" \
  -H "Authorization: Bearer wa_YOUR_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: diwali-post-1" \
  -d '{
    "kind": "image",
    "text": "Our Diwali hampers are here. Order on WhatsApp.",
    "media": ["linkedin-posts/8b0c…/2f4e9a1c-7d3b-4e5f-a6c8-1b2d3e4f5a6b.jpg"],
    "action": "publish"
  }'

Schedule a post, then cancel it

curl -X POST "https://fliok.com/api/v1/linkedin/posts" \
  -H "Authorization: Bearer wa_YOUR_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "kind": "text", "text": "We are hiring support agents in Kolkata.", "action": "schedule", "scheduledAt": "2026-11-03T10:00:00+05:30" }'

curl -X PATCH "https://fliok.com/api/v1/linkedin/posts/c7a1e2d4-5b6f-4a8e-9c0d-1e2f3a4b5c6d" \
  -H "Authorization: Bearer wa_YOUR_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "cancel" }'

Make an online event and share it

curl -X POST "https://fliok.com/api/v1/linkedin/events" \
  -H "Authorization: Bearer wa_YOUR_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "online",
    "name": "WhatsApp selling masterclass",
    "description": "45 minutes on catalogs, broadcasts and replies.",
    "startsAt": "2026-11-20T16:00",
    "endsAt": "2026-11-20T16:45",
    "timeZone": "Asia/Kolkata",
    "url": "https://meet.example.com/masterclass",
    "action": "create",
    "share": { "text": "Join us live on 20 November.", "visibility": "PUBLIC" }
  }'

Read page comments and reply as the page

curl "https://fliok.com/api/v1/linkedin/comments?post=urn:li:share:7390000000000000001" \
  -H "Authorization: Bearer wa_YOUR_API_KEY"

curl -X POST "https://fliok.com/api/v1/linkedin/comments" \
  -H "Authorization: Bearer wa_YOUR_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: reply-7390-1" \
  -d '{ "action": "reply", "postUrn": "urn:li:share:7390000000000000001", "commentUrn": "urn:li:comment:(urn:li:share:7390000000000000001,7390000000000000077)", "text": "Thanks, Tanvi! DM us for the price list." }'

Rate limits

The buckets these endpoints use. Burst is how many requests you can make back-to-back from a full bucket; sustained is how fast it refills.

BucketEndpointsBurstSustained
Reads/messages · /conversations · /contacts · /templates · /phone-numbers · GET /webhooks · Instagram, LinkedIn, ads and catalog reads · GET /payment-requests/{id}60060 / sec
LinkedIn postsPOST /linkedin/posts · PATCH and DELETE /linkedin/posts/{id} · POST /linkedin/posts/{id}/retry601 / sec
LinkedIn mediaPOST /linkedin/media (a video or document also draws from a large-upload bucket: 4, then 1 / 30 sec)301 / 2 sec
LinkedIn eventsPOST /linkedin/events · PATCH and DELETE /linkedin/events/{id} · POST /linkedin/events/{id}/share301 / sec
LinkedIn commentsPOST and DELETE /linkedin/comments2020 / min

Every limit, the RateLimit-* headers and what to do on a 429: Rate limits.