Docs (knowledge base)
The docs group talks to the Help Scout Docs API, a separate product with its own
per-user API key, independent of your Mailbox/Inbox login.
Authenticate
Section titled “Authenticate”Find your Docs API key in the web app under your profile → Authentication → API Keys (you need the “Docs: Create new, edit settings & Collections” permission), then store it once in your OS keychain:
$ hscli docs auth✓ Docs API key stored for profile "default"For CI, pass it through the environment instead — no keychain needed:
HSCLI_DOCS_API_KEY="$HELPSCOUT_DOCS_KEY" hscli docs site listSites & collections
Section titled “Sites & collections”hscli docs site listhscli docs site get <siteId>hscli docs collection list --site <siteId> --visibility publichscli docs collection get <id>hscli docs category list <collectionId>Articles
Section titled “Articles”# list articles in a collection (or a category)hscli docs article list --collection <id> --status published
# fetch one article — the body HTML lives in the `text` fieldhscli docs article get <id> --output json --jq '.[].text'
# full-text search across the knowledge basehscli docs article search "password reset" --collection <id>Create, update & delete articles
Section titled “Create, update & delete articles”hscli docs article create --collection <id> --name "Title" --text @article.html --status notpublishedhscli docs article update <id> --status publishedhscli docs article delete <id> --yesNew articles default to notpublished, so nothing goes public by accident. --text takes
inline HTML or @file, and delete prompts for confirmation unless you pass --yes.
Drafts
Section titled “Drafts”Stage changes without touching the published article — useful for reviewing before going live:
hscli docs article save-draft <id> --text @draft.html # stage a drafthscli docs article delete-draft <id> --yes # discard it; published text is keptManage collections & categories
Section titled “Manage collections & categories”hscli docs collection create --site <siteId> --name "Guides" --visibility publichscli docs collection update <id> --name "Renamed"hscli docs collection delete <id> --yes
hscli docs category create --collection <id> --name "Billing"hscli docs category update <id> --name "Renamed" --order 2hscli docs category delete <id> --yesThe Docs API requires --name on every collection/category update, even when you only mean
to change --visibility or --order. Deletes prompt for confirmation unless you pass --yes.
See the command reference for every command and flag.