Skip to content

Update an inbound route

PATCH
/inbound_routes/{id}
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
const inboundRoute = await mv.inboundRoutes.update("rte_Hz9XLopCXuVC77SlkVsLAz", {
enabled: false,
});
console.log(inboundRoute);

Changes the fields you send. A new target replaces the old one (and drops fallback_assistant_id when the new target is an assistant).

Try it in the API playground with a test-mode key.

id
required
string
<= 200 characters /^rte_[0-9A-Za-z]+$/

A inbound route ID (rte_…).

MoreVoice-Version
string
/^\d{4}-\d{2}-\d{2}$/

The API version to use for this request. Defaults to the version the API key is pinned to.

Example
2026-11-01
Media typeapplication/json

The fields to change; everything else is kept.

object
connection_id
Any of:

Only calls on this connection; null for any.

string
<= 200 characters /^conn_[0-9A-Za-z]+$/
enabled
boolean
fallback_assistant_id
Any of:

Answers when the target cannot take the call; null for none. Not with an assistant target.

string
<= 200 characters /^asst_[0-9A-Za-z]+$/
match_caller

The caller’s number: exact, a prefix ending in *, or empty for any.

string
<= 40 characters /^\+?[0-9\s()-]*\*?$/
match_did

The dialled number: exact, a prefix ending in *, or empty for any.

string
<= 40 characters /^\+?[0-9\s()-]*\*?$/
name
string
<= 120 characters
priority
integer
>= -100000 <= 100000
target

Where a matching call goes: type, and the ID in <type>_id.

object
assistant_id

With type: assistant.

string
<= 200 characters /^asst_[0-9A-Za-z]+$/
conference_room_id

With type: conference_room.

string
<= 200 characters /^room_[0-9A-Za-z]+$/
flow_id

With type: flow (a published voice flow).

string
<= 200 characters /^flow_[0-9A-Za-z]+$/
queue_id

With type: queue.

string
<= 200 characters /^q_[0-9A-Za-z]+$/
type
required

What answers: assistant — an AI assistant answers; flow — a published voice flow (IVR) runs; queue — the call waits in a queue for a human agent; user — one person’s direct line (their forwarding rules apply); conference_room — a conference room (PIN prompt, then join). The ID goes in the field <type>_id.

string
Allowed values: assistant flow queue user conference_room
user_id

With type: user.

string
<= 200 characters /^usr_[0-9A-Za-z]+$/

OK

Media typeapplication/json

A rule that sends inbound calls (by dialled number and caller) to an assistant, flow, queue, person or room.

object
connection_id
required
Any of:

Only calls arriving on this connection, or null for any.

string
/^conn_[0-9A-Za-z]+$/
created
required

An ISO-8601 timestamp in UTC.

string format: date-time
enabled
required
boolean
fallback_assistant_id
required
Any of:

Answers when the target cannot take the call (a disabled queue, a deactivated user), or null.

string
/^asst_[0-9A-Za-z]+$/
id
required

The route’s ID.

string
/^rte_[0-9A-Za-z]+$/
livemode
required

true in live mode, false in test mode.

boolean
match_caller
required

The caller’s number: exact, a prefix ending in *, or empty for any.

string
match_did
required

The dialled number: exact, a prefix ending in *, or empty for any.

string
name
required
string
object
required
string
Allowed value: inbound_route
priority
required

Lower runs first; the first matching route wins.

integer
>= -9007199254740991 <= 9007199254740991
target
required
Any of:

Where a matching call goes.

object
assistant_id

With type: assistant.

string
/^asst_[0-9A-Za-z]+$/
conference_room_id

With type: conference_room.

string
/^room_[0-9A-Za-z]+$/
flow_id

With type: flow.

string
/^flow_[0-9A-Za-z]+$/
queue_id

With type: queue.

string
/^q_[0-9A-Za-z]+$/
type
required

What answers: assistant — an AI assistant answers; flow — a published voice flow (IVR) runs; queue — the call waits in a queue for a human agent; user — one person’s direct line (their forwarding rules apply); conference_room — a conference room (PIN prompt, then join). The ID goes in the field <type>_id.

string
Allowed values: assistant flow queue user conference_room
user_id

With type: user.

string
/^usr_[0-9A-Za-z]+$/
Example
{
"connection_id": "conn_2Wq8RfLx0bZt7nKp1VdYhC",
"created": "2026-11-03T09:14:22.000Z",
"enabled": true,
"fallback_assistant_id": "asst_3cYbE6uYvGkH8w4ZK1rTqd",
"id": "rte_5Hn3MpO0qR5sT7uW9xY1zA",
"livemode": true,
"match_caller": "",
"match_did": "+97231234567",
"name": "Sales line",
"object": "inbound_route",
"priority": 100,
"target": {
"queue_id": "q_4Gk2LmN9pQ4rS6tV8wX0yZ",
"type": "queue"
}
}

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "parameter_missing",
"doc_url": "https://docs.morevoice.ai/api/errors#parameter-missing",
"message": "Missing required parameter: to.",
"param": "to",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "invalid_request_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

No valid API key was sent.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "invalid_api_key",
"doc_url": "https://docs.morevoice.ai/api/errors#invalid-api-key",
"message": "Invalid API key.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "authentication_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

The key may not do this (a missing scope, a plan limit, or a compliance block).

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "missing_scope",
"doc_url": "https://docs.morevoice.ai/api/errors#missing-scope",
"message": "This API key lacks the calls:write scope.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "permission_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

No object with this ID exists in this organisation and mode.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "resource_missing",
"doc_url": "https://docs.morevoice.ai/api/errors#resource-missing",
"message": "No such object: 'call_4Gk2'.",
"param": "id",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "not_found"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

Too many requests, or no call capacity right now. Retry after the Retry-After delay.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "rate_limited",
"doc_url": "https://docs.morevoice.ai/api/errors#rate-limited",
"message": "Too many requests. Retry after 1 second.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "rate_limit_error"
}
}
Retry-After
integer

Seconds to wait before retrying.

X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "internal_error",
"doc_url": "https://docs.morevoice.ai/api/errors#internal-error",
"message": "Something went wrong on MoreVoice's side.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "api_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.