REST API & CLI

The app is a thin layer over this API. Interactive OpenAPI docs are at /docs on your install.

Authentication: send X-API-Token if LA_API_TOKEN is set, or sign in for a session cookie in team mode. Choose a workspace with X-Account: 2.

MethodPathPurpose
GET/api/dashboardCounts, upcoming posts, best slots
GET/POST/api/skills[/{id}]List skills, or run one
GET/POST/api/postsList (status, start, end) or create a draft
PATCH/DELETE/api/posts/{id}Edit, attach media, set metrics, delete
POST/api/posts/{id}/approveApprove, or schedule with scheduled_at
POST/api/posts/{id}/publishPublish an approved post
POST/api/posts/{id}/shareCreate a signed client review link
GET/POST/api/media, /api/media/upload|generate|carouselImages and PDF carousels
POST/api/import/linkedin, /api/import/analyticsImport exports (base64 files)
GET/POST/api/packs[/{id}]Persona packs
GET/POST/api/trends, /api/trends/feeds|refreshTrend feeds
GET/api/analyticsHeatmap, top posts, by hook and pillar
GET/POST/api/accountsWorkspaces (send X-Account header to choose one)
GET/POST/api/team, /api/auth/*Users, roles, sign-in
GET/POST/api/integrationsTelegram, WhatsApp, Slack, webhooks, calendar link
GET/calendar/{acct}/{token}.icsCalendar subscription
GET/api/export/posts.csvCSV export
GET/POST/api/brand, /api/stories, /api/contacts, /api/documentsLibrary
GET/POST/api/llm, /api/image-model, /api/scheduleSettings

Example

curl -X POST localhost:8787/api/skills/post_writer -H 'content-type: application/json' \
  -d '{"topic":"What 100 sales calls taught me","goal":"comments"}'
curl -X POST localhost:8787/api/posts/12/approve -H 'content-type: application/json' -d '{}'
curl -X POST localhost:8787/api/posts/12/publish

CLI

linkedin-agent serve [--host 0.0.0.0 --port 8787]
linkedin-agent-desktop
linkedin-agent mcp [--http]
linkedin-agent skills
linkedin-agent run post_writer -i topic="Hiring lessons" -i goal=comments