canonical: https://jentic.com/apis/linkedin.com/linkedin

# LinkedIn API

Jentic publishes the only available OpenAPI specification for LinkedIn API, keeping it validated and agent-ready. Access member profiles, company pages, UGC posts, shares, and social interactions through 15 endpoints on LinkedIn's v2 REST API. Supports OAuth 2.0 authentication with granular scopes for profile reads, content publishing, and organization management using the Rest.li protocol.

## For AI agents

Retrieve member profiles, publish posts and shares, manage company pages, and track social engagement on LinkedIn. Covers 15 endpoints for professional content and networking.

## Scope

Does not handle LinkedIn Ads, Recruiter features, or Learning platform content - use for member profiles, organic posting, and organization page management only.

## Capabilities

- Retrieve authenticated member profiles including headline, positions, and email address
- Publish UGC posts and shares to personal profiles and company pages
- Fetch organization details and page statistics including follower counts
- Post comments and likes on activities as social engagement actions
- Look up member profiles by person ID with field projection for selective data retrieval
- Query organization access control lists to verify page admin permissions
- Access OpenID Connect userinfo for identity verification and SSO

## Use cases

### AI Agent Content Publishing

An AI agent publishes professional content to LinkedIn by posting UGC (User Generated Content) via POST /ugcPosts with article, image, or text share types. Through Jentic, the agent discovers the publishing operation by searching 'post to linkedin', loads the UGC schema with author URN and share commentary fields, and executes without manual LinkedIn developer portal setup. Supports targeting by seniority, industry, and geography for organization posts.

Example prompt: Create a UGC post via POST /ugcPosts with shareCommentary 'Excited to announce our new product launch' and visibility set to PUBLIC for the authenticated member

### Organization Page Management

Retrieve company page details via GET /organizations/{organizationId} including name, description, logo URL, and industry. Access page statistics through GET /organizationPageStatistics for follower counts, page views, and content engagement metrics. Verify page admin permissions using GET /organizationalEntityAcls before attempting publish operations.

Example prompt: Retrieve organization details for organizationId 12345 via GET /organizations/12345 and then fetch page statistics via GET /organizationPageStatistics?q=organization&organization=urn:li:organization:12345

### Member Profile Retrieval

Access the authenticated member's profile through GET /me with field projection for selecting specific fields like firstName, lastName, headline, and profilePicture. Look up other members via GET /people/(id:{personId}) when appropriate connection permissions exist. Retrieve email addresses through the dedicated GET /emailAddress endpoint with the r_emailaddress scope.

Example prompt: Retrieve the authenticated member's profile via GET /me and email via GET /emailAddress?q=members&projection=(elements*(handle~)) and combine into a contact record

### Social Engagement Automation

Post comments on LinkedIn activities via POST /socialActions/{activityUrn}/comments and register likes via POST /socialActions/{activityUrn}/likes. Enables engagement automation workflows for brand accounts that respond to mentions, acknowledge shares, and maintain active presence on the platform.

Example prompt: Post a comment 'Great insights, thanks for sharing!' on activity urn:li:activity:12345 via POST /socialActions/urn:li:activity:12345/comments

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /me | Retrieve authenticated member's profile |
| POST | /ugcPosts | Publish a UGC post to LinkedIn |
| GET | /organizations/{organizationId} | Get organization page details |
| GET | /organizationPageStatistics | Retrieve page follower and engagement stats |
| POST | /socialActions/{activityUrn}/comments | Post a comment on an activity |
| POST | /socialActions/{activityUrn}/likes | Like an activity |
| GET | /emailAddress | Retrieve member's email address |

## Key resources

- **Members** — Retrieve profiles, email addresses, and identity information via /me and /people
- **UGC Posts** — Create and retrieve user-generated content posts with shares and articles
- **Organizations** — Access company page details, statistics, and admin permissions
- **Social Actions** — Post comments and likes on LinkedIn activities
- **Shares** — Create and retrieve share posts on personal and organization profiles

## Why Jentic

- **Setup:** Wiring the LinkedIn API by hand means running its OAuth 2.0 flow, matching scopes like w_member_social and rw_organization_admin to each call, formatting Rest.li author URNs, and calling api.linkedin.com/v2 yourself. Through Jentic you install once, import the LinkedIn API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** LinkedIn puts the organization id and activity URN in the URL path (/organizations/{organizationId}, /socialActions/{activityUrn}/comments), so a rule can pin your agent to one organization page and its social actions. You choose the operations it may call, so publishing member posts is not included unless you add them.
- **Credential handling:** Your LinkedIn OAuth 2.0 token is stored once, encrypted, by your own Jentic One instance and injected at execution time. Client secrets and refresh tokens never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'post an article to LinkedIn' or 'read organization page statistics', and Jentic returns the matching LinkedIn operation with its Rest.li request schema, including the author URN format, so the agent calls the right endpoint without browsing the LinkedIn developer docs.

## Related APIs

- **Twitter API v2** — Public microblogging platform for short-form content rather than professional networking
- **HubSpot CRM Contacts** — CRM contact management that stores leads generated from LinkedIn outreach
- **Buffer API** — Social media scheduling tool for queuing LinkedIn posts alongside other platform content

## FAQ

### Why is there no official OpenAPI spec for LinkedIn API?

LinkedIn does not publish an OpenAPI specification for their REST API. Jentic generates and maintains this spec so that AI agents and developers can call LinkedIn API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the LinkedIn API use?

The LinkedIn API uses OAuth 2.0 authorization code flow with specific permission scopes. Common scopes include r_liteprofile (basic profile), r_emailaddress (email), w_member_social (post/comment/like), and rw_organization_admin (company page management). Bearer tokens are passed in the Authorization header. Through Jentic, these tokens are stored encrypted in your Jentic One instance - agents receive scoped tokens without handling raw client credentials.

### Can I publish posts to LinkedIn through this API?

Yes. Use POST /ugcPosts with the w_member_social scope to publish text, articles, or image shares. The request body requires an author URN (urn:li:person:{id}), lifecycleState set to PUBLISHED, shareCommentary text, and visibility settings. For organization posts, use the organization URN as the author with appropriate rw_organization_admin permissions.

### What are the rate limits for the LinkedIn API?

LinkedIn enforces application-level throttling at 100 requests per day for most endpoints on standard developer apps. Partner-level apps receive higher limits. The /ugcPosts endpoint allows up to 25 posts per day per member. Rate limit status is returned via X-Li-Response-Throttled headers when approaching limits.

### How do I post to a company page through Jentic?

Install the Jentic SDK with pip install jentic, then search for 'publish post to linkedin company page'. Jentic returns the POST /ugcPosts operation with the full request schema showing the organization author URN format, share commentary structure, and required visibility fields. Verify admin access first by loading the GET /organizationalEntityAcls operation. Get started with Jentic One, the self-hosted execution layer.

### Can I retrieve engagement metrics for LinkedIn company pages?

Yes. Use GET /organizationPageStatistics with the organization URN as a query parameter to retrieve follower counts, page views, and content engagement data. The endpoint requires the rw_organization_admin scope and returns time-bound statistics with breakdowns by visitor demographics.

### Does the LinkedIn API support commenting on posts?

Yes. Use POST /socialActions/{activityUrn}/comments to add a comment on any LinkedIn activity. The request body requires the actor URN and message text. Retrieve existing comments with GET /socialActions/{activityUrn}/comments. Both endpoints require the w_member_social scope.

### Can I limit what my agent is allowed to do with the LinkedIn API?

Yes. Jentic One is self-hosted, so you run it and your own rules decide which LinkedIn operations and credentials the agent may use. Because LinkedIn puts the organization id and activity URN in the URL path (/organizations/{organizationId}, /socialActions/{activityUrn}/comments), you can pin the agent to a single company page and its social actions. You choose the operations it may call, so publishing member posts through POST /ugcPosts is excluded unless you explicitly add it.
