Try shared-bot routing
Evaluates a draft routing configuration and draft channel scope against a sample on the bot's evaluation host, for one channel and situation (a new conversation, an explicit mention, or an established thread with participant flags), then settles the targets exactly as the router does: every matched rule's agent, deduplicated, or Otherwise; a constrained situation keeps its recipients or skips. Writes nothing and never stores or logs the sample. Off, outside-scope, paused, Needs review, and unsupported configurations return not_applied with the reason and no model call; a situation whose recipients all participate settles with no model call. Returns 503 when the evaluation host is offline or unreachable; a provider failure returns unavailable with its continuation, which is never a skip.
Authorization
bearerAuth In: header
Path Parameters
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/orgs/string/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/decision-routing/preview" \ -H "Content-Type: application/json" \ -d '{ "config": { "decisionId": "string", "rules": [ { "id": "string", "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "action": { "type": "agent", "agentId": "string" } } ], "enabled": true, "otherwise": { "type": "default_agent" } }, "channelIds": [ "string" ], "channelId": "string", "targets": { "type": "new" }, "state": { "history": [ { "sender": "string", "text": "string" } ], "currentMessage": { "text": "string" } } }'{ "mode": "live", "readiness": { "status": "ready" }, "evaluation": { "status": "answered", "answer": { "type": "boolean", "value": true, "probability": 0 }, "model": "string", "usage": { "inputTokens": 0, "outputTokens": 0 } }, "chain": [ { "stepId": "string", "decisionId": "string", "evaluation": { "status": "answered", "answer": { "type": "boolean", "value": true, "probability": 0 }, "model": "string", "usage": { "inputTokens": 0, "outputTokens": 0 } } } ], "detail": { "seq": 0, "at": "string", "channel": "string", "messageId": "string", "title": "string", "decisionId": "string", "outcome": "routed", "reason": "string", "evaluated": true, "answer": { "type": "boolean", "value": true, "probability": 0 }, "matchedKeys": [ "string" ], "matchedRuleIds": [ "string" ], "usedOtherwise": true, "fallback": "constrained", "targets": [ { "agentId": "string", "effect": "participant", "via": "mention", "participant": true, "disposition": "pending", "reason": "string" } ], "latencyMs": 0, "requestedModel": "string", "actualModel": "string", "usage": { "inputTokens": 0, "outputTokens": 0 }, "detailsExpired": true, "snapshot": { "decisionId": "string", "providerId": "string", "model": "string", "question": { "type": "choice", "instructions": "string", "criteria": { "property1": "string", "property2": "string" } }, "routing": { "decisionId": "string", "rules": [ { "id": "string", "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "action": { "type": "agent", "agentId": "string" } } ], "enabled": true, "otherwise": { "type": "default_agent" }, "steps": [ { "decisionId": "string", "rules": [ { "id": "string", "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "action": { "type": "agent", "agentId": "string" } } ], "id": "string" } ] }, "defaultAgentId": "string" }, "constraint": [ { "agentId": "string", "participant": true, "via": "mention" } ], "input": { "agent": { "name": "string", "description": "string" }, "currentMessage": { "id": "string", "sender": { "id": "string" }, "text": "string", "quote": { "sender": "string", "text": "string" }, "threadId": "string", "time": "string", "truncated": true }, "history": [ { "id": "string", "sender": { "id": "string" }, "text": "string", "quote": { "sender": "string", "text": "string" }, "threadId": "string", "time": "string", "truncated": true } ], "historyOmitted": 0, "context": { "partial": true, "reasons": [ "string" ], "omittedMessages": 0 } }, "fullAnswer": { "type": "boolean", "value": true, "probability": 0 }, "chain": [ { "stepId": "string", "decisionId": "string", "evaluation": { "status": "answered", "answer": { "type": "boolean", "value": true, "probability": 0 }, "model": "string", "usage": { "inputTokens": 0, "outputTokens": 0 } } } ], "steps": [ { "stepId": "string", "decisionId": "string", "providerId": "string", "model": "string", "question": { "type": "choice", "instructions": "string", "criteria": { "property1": "string", "property2": "string" } }, "condition": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "rawRequest": { "text": "string", "truncated": true }, "rawResponse": { "text": "string", "truncated": true } } ], "rawRequest": { "text": "string", "truncated": true }, "rawResponse": { "text": "string", "truncated": true } }, "consumer": { "type": "shared_bot_routing", "outcome": "activate", "notAppliedReason": "off", "reason": "string", "evaluated": true, "rules": [ { "ruleId": "string", "matched": true, "matchedKeys": [ "string" ] } ], "matchedRuleIds": [ "string" ], "matchedKeys": [ "string" ], "matchedAgentIds": [ "string" ], "usedOtherwise": true, "fallback": "constrained", "defaultAgent": { "id": "string", "name": "string" }, "targetConstraint": { "type": "new" }, "targets": [ { "agentId": "string", "name": "string", "effect": "participant", "participant": true, "via": "mention", "status": "available" } ] }}