niiko/developers

Miira · leads & WhatsApp v1 read-only

miira.agent_config_get

Reads how the sales agent is configured today: its persona, the script in order with what each question saves and scores, the funnel stages, the reference responses, the documents asked per client type and the milestones. With configured: false the workspace still has the demo setup. Changes nothing.

Last updated

POST /api/v1/reads/miira.agent_config_get
Token scope
miira.agent_config_get@1
Workspace permission
api.miira.agent_config_get off by default
Who reads
The person behind the token, with their role. Someone who leaves the workspace stops reading.
Three permissions

A token with that scope, the workspace owner having switched the read on, and the person's role seeing it in the product. None of them is enough alone. OAuth only →

Request

No fields.

Response — output when status is done

fieldtyperules
configuredbooleanrequired
personaobject | nullrequired
scriptobject[]required
stagesobject[]required
responsesobject[]required
documentsobject[]required
milestonesobject[]required

persona

fieldtyperules
namestringrequired
rolestringrequired
businessstringrequired
tonestringrequired
languagestringrequired

script[]

fieldtyperules
positionintegerrequired≥ 1
questionstringrequired
fieldstring | nullrequired
kind"capture" | "qualify"required
pointsintegerrequired
requiredbooleanrequired
atClosebooleanrequired
optionsstring[] | nullrequired
optionsByGroupmap<string, string[]> | nullrequired
onlyIfobject | nullrequired

onlyIf

fieldtyperules
fieldstringrequired
valuestringrequired

stages[]

fieldtyperules
namestringrequired
fromPointsintegerrequired
toPointsintegerrequired
qualifiedbooleanrequired

responses[]

fieldtyperules
whenstringrequired
textstringrequired

documents[]

fieldtyperules
clientTypestringrequired
documentstringrequired
pointsnumberrequired
optionalbooleanrequired

milestones[]

fieldtyperules
namestringrequired
markedWhen"required_questions" | "document" | "manual"required

Example

# Reads take an OAuth access token, not an API key, and no idempotency key: reading changes nothing.
curl -X POST https://niiko.org/api/v1/reads/miira.agent_config_get \
  -H "Authorization: Bearer $NIIKO_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
# 200 → done · 4xx → refused, with a named reason

Why it may refuse

Each reason names who can fix it and how; detail.message, when present, says what to do. Refusals & HTTP codes →

invalid_inputrole_forbiddengrant_offreads_need_a_person

In the clients

@vorluno/niiko-sdkniiko.getAgentConfig()
niiko (Python)niiko.get_agent_config() from 0.4.0 · not on the registry yet
niiko-cliniiko read miira.agent_config_get
n8n-nodes-niikoNo reads: the node holds a key, and reading needs a person through OAuth.
niiko-mcp-servermiira_agent_config_get readOnlyHint

History