Retrieve a connection
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.retrieve("conn_rtcFZ4v7Gg3mfomNppGQci");console.log(connection);import os
import requests
response = requests.get( "https://api.morevoice.ai/v1/connections/conn_rtcFZ4v7Gg3mfomNppGQci", headers={"Authorization": f"Bearer {os.environ['MOREVOICE_API_KEY']}"},)response.raise_for_status()print(response.json())curl https://api.morevoice.ai/v1/connections/conn_rtcFZ4v7Gg3mfomNppGQci \ -H "Authorization: Bearer $MOREVOICE_API_KEY"Try it in the API playground with a test-mode key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A connection ID (conn_…).
Header Parameters
Section titled “Header Parameters”The API version to use for this request. Defaults to the version the API key is pinned to.
Example
2026-11-01Responses
Section titled “Responses”OK
A SIP trunk or registration to your carrier. Live mode only.
object
Calls on the connection right now.
Answer inbound calls on this connection.
The authentication user, when it differs from username.
native: the platform’s own SIP stack. freeswitch: FreeSWITCH in front.
Numbers this connection may present as caller ID.
Audio codecs, in preference order.
An ISO-8601 timestamp in UTC.
The caller ID used when a call names none.
Disabled connections neither register nor carry calls.
The carrier’s SIP host.
The connection’s ID.
Trunks: extra source IPs / CIDRs allowed to send calls (the host’s addresses always are).
Share of max_channels outbound campaigns never use, kept for inbound calls.
true in live mode, false in test mode.
Simultaneous calls (0: unlimited).
New outbound calls per second (0: unlimited).
When the connection is full: busy (486) or unavailable (503, lets a carrier fail over).
Whether a password is stored. Passwords are write-only.
Send REGISTER to the host.
The connection’s live state.
object
The last registration error, or null.
registered / listening: ready. incomplete: settings are missing. failed: see error.
registration: registers like a phone/extension. trunk: a carrier trunk (IP or credential authentication).
An ISO-8601 timestamp in UTC.
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.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No valid API key was sent.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”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).
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No object with this ID exists in this organisation and mode.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”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.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”Seconds to wait before retrying.
The request’s ID (req_…). Quote it when you contact support.
Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.