Skip to content

Update a connection

PATCH
/connections/{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 connection = await mv.connections.update("conn_rtcFZ4v7Gg3mfomNppGQci", {
max_cps: 10,
password: "n3w-pa55",
});
console.log(connection);

Changes the fields you send; the rest is kept. password is write-only: a string replaces it, null removes it.

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

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

A connection ID (conn_…).

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
answer_inbound
boolean
auth_username
string
<= 200 characters
backend
string
Allowed values: native freeswitch
caller_ids
Array<string>
<= 500 items
codecs
Array<string>
>= 1 items <= 2 items
Allowed values: pcma pcmu
default_caller_id
Any of:

A phone number (E.164 preferred).

string
/^\+?[0-9\s()-]{2,24}$/
display_name
string
<= 200 characters
enabled
boolean
host

The carrier’s SIP host (a name or an IP address).

string
<= 253 characters
inbound_acl
Array<string>
<= 100 items
inbound_assistant_id
Any of:

The assistant for inbound calls no route matches; null for none.

string
<= 200 characters /^asst_[0-9A-Za-z]+$/
inbound_reserve_pct
integer
<= 90
max_channels
integer
<= 10000
max_cps
integer
<= 1000
name
string
>= 1 characters <= 80 characters
overflow_policy
string
Allowed values: busy unavailable
password
Any of:
string
>= 1 characters <= 500 characters
port
integer
>= 1 <= 65535
register
boolean
register_expires_seconds
integer
>= 60 <= 3600
transport
string
Allowed values: udp
type
string
Allowed values: registration trunk
username
string
<= 200 characters

OK

Media typeapplication/json

A SIP trunk or registration to your carrier. Live mode only.

object
active_calls
required

Calls on the connection right now.

integer
>= -9007199254740991 <= 9007199254740991
answer_inbound
required

Answer inbound calls on this connection.

boolean
auth_username
required

The authentication user, when it differs from username.

string
backend
required

native: the platform’s own SIP stack. freeswitch: FreeSWITCH in front.

string
Allowed values: native freeswitch
caller_ids
required

Numbers this connection may present as caller ID.

Array<string>
codecs
required

Audio codecs, in preference order.

Array<string>
Allowed values: pcma pcmu
created
required

An ISO-8601 timestamp in UTC.

string format: date-time
default_caller_id
required

The caller ID used when a call names none.

string
display_name
required
string
enabled
required

Disabled connections neither register nor carry calls.

boolean
host
required

The carrier’s SIP host.

string
id
required

The connection’s ID.

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

Trunks: extra source IPs / CIDRs allowed to send calls (the host’s addresses always are).

Array<string>
inbound_assistant_id
required
Any of:

The assistant that answers inbound calls no inbound route matches, or null.

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

Share of max_channels outbound campaigns never use, kept for inbound calls.

integer
>= -9007199254740991 <= 9007199254740991
livemode
required

true in live mode, false in test mode.

boolean
max_channels
required

Simultaneous calls (0: unlimited).

integer
>= -9007199254740991 <= 9007199254740991
max_cps
required

New outbound calls per second (0: unlimited).

integer
>= -9007199254740991 <= 9007199254740991
name
required
string
object
required
string
Allowed value: connection
overflow_policy
required

When the connection is full: busy (486) or unavailable (503, lets a carrier fail over).

string
Allowed values: busy unavailable
password_set
required

Whether a password is stored. Passwords are write-only.

boolean
port
required
integer
>= -9007199254740991 <= 9007199254740991
register
required

Send REGISTER to the host.

boolean
register_expires_seconds
required
integer
>= -9007199254740991 <= 9007199254740991
status
required

The connection’s live state.

object
error
required

The last registration error, or null.

string | null
expires_seconds
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
registered_at
required
Any of:

An ISO-8601 timestamp in UTC.

string format: date-time
state
required

registered / listening: ready. incomplete: settings are missing. failed: see error.

string
Allowed values: disabled incomplete registering registered listening failed
transport
required
string
Allowed values: udp
type
required

registration: registers like a phone/extension. trunk: a carrier trunk (IP or credential authentication).

string
Allowed values: registration trunk
updated
required

An ISO-8601 timestamp in UTC.

string format: date-time
username
required
string
Example
{
"active_calls": 2,
"answer_inbound": true,
"auth_username": "",
"backend": "native",
"caller_ids": [
"+97231234567"
],
"codecs": [
"pcma",
"pcmu"
],
"created": "2026-11-03T09:14:22.000Z",
"default_caller_id": "+97231234567",
"display_name": "",
"enabled": true,
"host": "sip.carrier.example.com",
"id": "conn_2Wq8RfLx0bZt7nKp1VdYhC",
"inbound_acl": [
"198.51.100.0/24"
],
"inbound_assistant_id": "asst_3cYbE6uYvGkH8w4ZK1rTqd",
"inbound_reserve_pct": 15,
"livemode": true,
"max_channels": 30,
"max_cps": 5,
"name": "Main trunk",
"object": "connection",
"overflow_policy": "busy",
"password_set": false,
"port": 5060,
"register": false,
"register_expires_seconds": 300,
"status": {
"error": null,
"expires_seconds": null,
"registered_at": null,
"state": "listening"
},
"transport": "udp",
"type": "trunk",
"updated": "2026-11-03T09:14:22.000Z",
"username": ""
}

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.