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.
| Method | Path | Purpose |
|---|---|---|
GET | /api/dashboard | Counts, upcoming posts, best slots |
GET/POST | /api/skills[/{id}] | List skills, or run one |
GET/POST | /api/posts | List (status, start, end) or create a draft |
PATCH/DELETE | /api/posts/{id} | Edit, attach media, set metrics, delete |
POST | /api/posts/{id}/approve | Approve, or schedule with scheduled_at |
POST | /api/posts/{id}/publish | Publish an approved post |
POST | /api/posts/{id}/share | Create a signed client review link |
GET/POST | /api/media, /api/media/upload|generate|carousel | Images and PDF carousels |
POST | /api/import/linkedin, /api/import/analytics | Import exports (base64 files) |
GET/POST | /api/packs[/{id}] | Persona packs |
GET/POST | /api/trends, /api/trends/feeds|refresh | Trend feeds |
GET | /api/analytics | Heatmap, top posts, by hook and pillar |
GET/POST | /api/accounts | Workspaces (send X-Account header to choose one) |
GET/POST | /api/team, /api/auth/* | Users, roles, sign-in |
GET/POST | /api/integrations | Telegram, WhatsApp, Slack, webhooks, calendar link |
GET | /calendar/{acct}/{token}.ics | Calendar subscription |
GET | /api/export/posts.csv | CSV export |
GET/POST | /api/brand, /api/stories, /api/contacts, /api/documents | Library |
GET/POST | /api/llm, /api/image-model, /api/schedule | Settings |
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