Skip to content

LinkedIn API

Postproxy publishes feed posts to a LinkedIn personal profile or a company page (organization), including image, video, and document (PDF/slide) posts.

Every request below uses the base URL https://api.postproxy.dev and an Authorization: Bearer YOUR_API_KEY header. Replace YOUR_API_KEY and the example IDs with your own.

Every post targets one or more profiles. A profile is one connected account — for LinkedIn, a personal profile or a company page (organization). Reference one in a request by its id (the prof_abc123 in the examples below) or by the platform name "linkedin", which selects the group’s LinkedIn profile (a group holds at most one profile per platform). List what’s connected with GET /api/profiles.

Profiles live in profile groups — containers that organize the accounts for one brand, client, or project. List groups with GET /api/profile_groups, and connect a new LinkedIn profile with the Initialize Connection endpoint.

Example: get profiles and profile groups

List the profiles you can post to — GET /api/profiles:

Terminal window
curl -X GET "https://api.postproxy.dev/api/profiles" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id": "prof_abc123",
"name": "My Company",
"platform": "linkedin",
"status": "active",
"profile_group_id": "grp_xyz789",
"expires_at": null,
"post_count": 53,
"avatar_url": "https://cdn.postproxy.dev/uploads/avatar_prof_abc123.jpg"
}
]
}

List your profile groups — GET /api/profile_groups:

Terminal window
curl -X GET "https://api.postproxy.dev/api/profile_groups" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{ "id": "grp_xyz789", "name": "Main Brand", "profiles_count": 5 },
{ "id": "grp_def456", "name": "Client Project", "profiles_count": 3 }
]
}
Platform IDlinkedin
Formatspost (default)
Character limit3,000
MediaOptional
PlacementsPersonal profile + organizations — selected with organization_id
CommentsComing soon
Direct messagesNo
Post chainsNo
ParameterTypeRequiredDescription
organization_idstringNoPost as a company page. Omit to post on the personal profile
MediaMax sizeFormatsCountDuration
Image8 MBjpg, png, gif20
Video5 GBmp4, mov, avi1up to 15 min
Document100 MBpdf, doc, docx, ppt, pptx1
  • Text-only posts are allowed; media is optional.
  • Images and video cannot be mixed.
  • A document must be posted on its own — it cannot be combined with images or video. Max 300 pages.
  • Minimum image dimensions: 552×276 px.
Terminal window
# Post to the personal profile
curl -X POST "https://api.postproxy.dev/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "We are excited to share our latest product update!" },
"profiles": ["prof_abc123"],
"media": ["https://example.com/image.jpg"],
"platforms": { "linkedin": {} }
}'
Terminal window
# Post to a company page
curl -X POST "https://api.postproxy.dev/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Hiring! We are growing the engineering team." },
"profiles": ["prof_abc123"],
"platforms": { "linkedin": { "organization_id": "12345678" } }
}'
Terminal window
# Document (PDF carousel) — must be the only attachment
curl -X POST "https://api.postproxy.dev/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Our 2026 industry report — free download." },
"profiles": ["prof_abc123"],
"media": ["https://example.com/report.pdf"],
"platforms": { "linkedin": { "organization_id": "12345678" } }
}'

A LinkedIn profile can publish to the personal profile and to any organizations the account administers. List them with the placements endpoint:

  • The personal profile is returned with id: null.
  • Each organization’s id is the value you pass as organization_id.
Terminal window
# List placements (personal profile + organizations)
curl "https://api.postproxy.dev/api/profiles/prof_abc123/placements" \
-H "Authorization: Bearer YOUR_API_KEY"

Omit organization_id to publish on the personal profile.

Coming soon. Comment list, reply, hide, and delete support for LinkedIn is in progress. When live, comments will be managed through the Comments API.

Not supported.

Postproxy records periodic stat snapshots you can pull as a timeseries; field names pass through from LinkedIn unchanged.

Follower and page-view metrics, refreshed roughly every 23 hours and scoped per placement (personal profile + each organization) — pass the placement_id. See the Profile stats endpoint (GET /api/profiles/:id/stats).

Fields: followerCount, shareCount, likeCount, commentCount, clickCount, engagement, allPageViews, overviewPageViews, aboutPageViews, careersPageViews, peoplePageViews, insightsPageViews

Terminal window
# Fetch the stats timeseries for one organization (placement_id is the organization_id)
curl "https://api.postproxy.dev/api/profiles/prof_abc123/stats?placement_id=12345678" \
-H "Authorization: Bearer YOUR_API_KEY"

Per-post engagement, captured after publish via the Post stats endpoint (GET /api/posts/stats). LinkedIn currently reports impressions only.

Fields: impressions

Terminal window
# Fetch post stats
curl "https://api.postproxy.dev/api/posts/stats?post_ids=post_abc123&profiles=linkedin" \
-H "Authorization: Bearer YOUR_API_KEY"

Subscribe with the Webhooks API:

Terminal window
curl -X POST "https://api.postproxy.dev/api/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/postproxy",
"events": ["platform_post.published", "platform_post.insights", "profile.stats"]
}'

Events relevant to LinkedIn:

EventWhen
post.processedA post is ready to publish
platform_post.publishedA post was published to the platform
platform_post.failedA post failed to publish (retries exhausted)
platform_post.failed_waiting_for_retryA publish attempt failed; will retry
platform_post.insightsNew analytics snapshot
profile.connected / .disconnectedConnection state changed
profile.statsNew profile stats snapshot — fires once per placement (personal profile + each organization)
media.failedA media attachment failed to process
  • Choose the audience with organization_id: present → company page, absent → personal profile.
  • Document posts (PDF, DOCX, PPTX) render as LinkedIn’s native multi-page carousel and must be the only attachment.