Skip to main content
POST
Test a message
Use this to check your rules and thresholds before real leads write. Nothing is sent and nothing is saved: no lead, no conversation, no decision.
  • The router must be on (is_active: true). Otherwise the API returns 400 inbound_router_inactive.
  • channel accepts whatsapp, webchat, email, or api.
  • Each call is a new first message. Earlier tests are not remembered. When the result has a clarify_question, that is what the agent would ask the lead.
  • Rules on phone and metadata use the phone and metadata you send in the body. The test sends no email or tags, so rules on email or tags find no value, and only not_exists matches them.
  • MCP keys need workflows:read. The test does not need confirm.

Authorizations

X-API-Key
string
header
required

API key for authentication. Keys are prefixed with nxr_live_.

Path Parameters

id
string<uuid>
required

Agent ID (master_workflow in the API). A malformed ID returns 400 invalid_group_id.

Body

application/json
channel
enum<string>
required

Channel the message arrives on.

Available options:
whatsapp,
webchat,
email,
api
first_message_text
string
required

The lead's first message.

Minimum string length: 1
phone
string

Optional phone number of the simulated lead. Rules on phone check this value.

metadata
object

Optional metadata of the simulated lead. Rules on metadata.<key> check these values.

Response

Result of the simulation.

agent_group_id
string<uuid>
required
dry_run
enum<boolean>
required
Available options:
true
layer
string | null
required

Step that decided. Same values as layer in List decisions.

action
enum<string> | null
required

What the AI step did: ROUTE picked a task, ASK_AGAIN asks a clarifying question, FALLBACK used the default task. null when another step decided.

Available options:
ROUTE,
ASK_AGAIN,
FALLBACK,
null
routed_workflow_id
string<uuid> | null
required

Task that would answer. null while a clarifying question is pending.

routed_workflow_name
string | null
required
confidence
number | null
required
clarify_question
string | null
required

Question the agent would ask the lead.

max_turns_reached
boolean
required

true when the clarifying questions ran out and the default or best task was used.

Last modified on September 28, 2026