PostHero API

v1 Reference

CLI (npm)

The PostHero CLI is an official command-line tool that wraps the REST API. It lets you create, schedule, and publish posts directly from your terminal — no code required. Install
npm install -g @posthero/cli
Authenticate
posthero login
Paste your API key when prompted. You can generate one in Settings > API. Create a post
posthero posts create --text "Just shipped v2.0!" --platforms "linkedin:<accountId>" --now
Useful for - Automating posts from CI/CD pipelines - Shell scripts and cron jobs - Publishing from any environment without a browser Links - CLI marketing page — full command reference and examples - npm package — install and changelog