> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getnexor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get inbound router

> Read an agent's inbound router settings, its shared identity, and the tasks the router can choose from.

The inbound router lets an agent choose which of its tasks answers a new inbound conversation, using your rules and what the lead writes. In the app this is **Let your agent choose the task**. See [Tasks that work together](/docs/en/guides/getting-started/connected-agents).

In the API an agent is a `master_workflow` and a task is a `workflow`. The agent ID goes in the path, and tasks appear in fields such as `default_workflow_id` and `target_workflow_id`.

## How the router picks a task

For each new conversation, the router goes through these steps in order and stops at the first one that decides. Each step has a `layer` value, shown in [List decisions](/docs/en/api/inbound-router/list-routing-decisions).

| Step | `layer` | What happens |
| - | - | - |
| Open conversation | `fold` | The lead already has an open conversation in this agent, so it continues there. |
| Recent route | `window` | The lead was routed within `routing_window_hours`, so it goes back to the same task. |
| Rules | `rule` | The first active rule whose conditions all match. |
| Current task | `prior` | The conversation arrived already tied to one of the agent's tasks, and the AI step does not apply. |
| Only one task | `single` | The agent has a single available task. |
| AI | `ai`, `clarify` | With `ai_enabled`, the AI reads the first message. It routes when it is confident enough, or asks the lead a clarifying question when it is less sure. |
| Default task | `default` | No earlier step decided. |

If something fails along the way, the conversation goes to the default task so the lead still gets an answer (`error_fail_open`).

## Before you start

* The inbound router is not available on every account. Without it, every endpoint in this section returns 403 `inbound_router_not_enabled`.
* MCP keys need `workflows:read` to read and `workflows:write` to make changes. Full-access API keys need nothing else.
* Every change requires `"confirm": true` in the body. Without it, the API returns 400 `confirmation_required` and changes nothing.
* Errors return a stable code in `error`, such as `agent_group_not_found`. Map the code to your own message.
* To choose which numbers and inboxes reach the agent, see [List entry points](/docs/en/api/inbound-router/list-entry-points).


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.getnexor.ai/llms.txt).
