CLI Documentation
Install niotio and drive campaigns, respondents, comment tags and follow-up cases from your terminal or a coding agent — with machine-readable JSON and safe non-interactive defaults.
MCP server for AI agents
If an AI agent (Claude, ChatGPT, Cursor, n8n) is doing the work, /mcp is the shorter path:
same tools, same token — the agent calls the platform directly instead of shelling out.
Install straight from this app — all you need is curl (no GitHub token, no Go).
curl -fsSL https://niotio.dk/cli/install.sh | sh
niotio config set-url https://niotio.dk
niotio config set-token YOUR_API_TOKEN
niotio doctor # checks config, health and auth
CI/agents can skip the file: NPS_URL + NPS_TOKEN (and NPS_LANG for Danish help text).
| Flag | Meaning |
|---|---|
--json | Machine-readable JSON (recommended for agents) |
--profile | Select a config profile |
--url / --token | Override the target |
--yes | Confirm destructive actions non-interactively |
--timeout | HTTP timeout (default 30s) |
| Command | Description |
|---|---|
niotio doctor | Check config, connectivity and auth |
niotio campaign list | get | create | update | List and edit campaigns |
niotio campaign activate | deactivate | send | Lifecycle and dispatch |
niotio campaign metrics | respondents | activity | Results and activity log |
niotio respondent add | import | Add respondents (single or CSV) |
niotio campaign simulate | simulate-clear | Generate/remove simulated responses (test campaigns) |
niotio case list | counts | show | notes | Follow-up cases: inbox, counters, one case, note timeline |
niotio case note | assign | status | Add a note, assign/unassign, change status with an outcome |
niotio tag list | create | update | delete | Comment tag vocabulary — with who created each tag |
niotio tag add | remove | Put one tag on a comment, or take it off (the rest stay) |
niotio comment list | tags | set-tags | Search comments by text, tag, rating and AI/human tagging; read or replace the tags on a comment |
niotio metrics | Account-wide NPS |
niotio usage | Survey email usage this month |
niotio help [topic] | Built-in help (EN/DA) |
id=$(niotio campaign create --name "agent-$(date +%s)" --test --json | jq -r .id)
niotio campaign simulate "$id" --count 5 --yes
niotio campaign metrics "$id" --json
niotio campaign simulate-clear "$id" --yes
niotio campaign delete "$id" --yes
Every command supports --json. Destructive actions need --yes when non-interactive.
Tags are per account. tag create fills the vocabulary, tag add/tag remove
touch one tag on one comment, and comment set-tags replaces the whole set.
A tag can be created by a person or by the browser's AI; --source/--ai
tell the two apart, and tag ai-remove removes only the model's assignments.
niotio tag list --source ai # tags the browser's model created
niotio tag create Pris --color '#0d6efd' # 1-40 chars, unique per account
niotio tag add Pris --comment 431 # keep the comment's other tags
niotio comment list --tag Pris --max-rating 6
niotio comment tags 431 # what is on it, and who applied it
niotio tag remove Pris --comment 431
niotio tag ai-remove --yes # drop AI assignments, keep human work
The same capability exists in the API (/api/comment-tags,
/api/comments) and in the MCP server
(comment_tags_*, comments_*) — same rules, same data.
A viewer can read tags but not set them; a stranger gets 404.
A low score opens a case automatically (0–6 always; 7–8 when the campaign opts in). From the terminal you can read the inbox, assign, note and close with an outcome — exactly like the web inbox. Needs Pro or above, with the campaign owner's follow-up cases switch on.
niotio case counts # open / overdue / mine / unassigned
niotio case list # my open cases
niotio case list --assignee unassigned # the queue nobody owns yet
niotio case show 367 # respondent, rating, comment, due date
niotio case note 367 --text "called them; sending a credit note"
niotio case assign 367 --user 3 # or --unassign
niotio case status 367 RESOLVED --outcome RETAINED
The same capability exists in the API (/api/cases) and in the
MCP server (cases_* tools) — same rules, same data.
With follow-up cases switched off, the server answers 403 followup_cases_disabled.