List SIP trunks with their URIs
const url = 'https://api.siprtc.io/v1/Accounts/example/SipTrunk/WithUris?status=active&page=1&limit=30';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.siprtc.io/v1/Accounts/example/SipTrunk/WithUris?status=active&page=1&limit=30' \ --header 'Authorization: Basic <credentials>'Returns SIP trunks like the plain list, but each trunk also carries its termination SIP domain (termination_uris) and its origination URIs. For a vendor account without customer_id the list holds the trunks of all its direct child accounts (not the vendor’s own), each with customer_info naming the owner; with customer_id it holds that child’s trunks. Other accounts get their own trunks. Paged like the plain list.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
Query Parameters
Section titled “ Query Parameters ”Return trunks whose name contains this text.
Return only this status. Default (or any / all): active and inactive.
Vendor accounts only: list the trunks of this direct child account.
Page number, starting at 1.
Page size.
Responses
Section titled “ Responses ”One page of trunks with URIs.
object
The request URL the page links are built from.
Page number that was returned (1-based).
Number of the last page.
Link to the next page; omitted on the last page.
Page size that was applied.
Link to the previous page; omitted on the first page.
Total number of matching records across all pages.
Trunks on this page, newest first.
object
Auth ID of the account that owns the trunk.
When the record was created (RFC 3339).
Auth ID of the account that created the record.
Owner details; filled only when a vendor lists its child accounts’ trunks.
object
Auth ID of the owning child account.
Email address on the owning account.
First name on the owning account.
Last name on the owning account.
Trunk ID (UUID).
Whether calls over the trunk are recorded.
Reserved JSON metadata; currently always “{}”.
Auth ID of the account that last changed the record.
Trunk name.
Concurrent inbound calls allowed.
Inbound calls per second allowed.
The trunk’s origination URIs. Only filled by GET /SipTrunk/WithUris.
object
Priority as a decimal string; lower is tried first.
Whether the URI is enabled.
SIP URI inbound calls are sent to.
Trunk status.
Concurrent outbound calls allowed.
Outbound calls per second allowed.
SIP domain of the trunk’s termination URI. Only filled by GET /SipTrunk/WithUris.
Reserved JSON configuration; currently always “{}”.
When the record was last changed (RFC 3339).
Example
{ "base_url": "http://api.siprtc.io/v1/Accounts/AC000000000000000000/SipTrunk?page=1", "current_page": 1, "last_page": 1, "next_url": "http://api.siprtc.io/v1/Accounts/AC000000000000000000/SipTrunk?page=2", "per_page": 30, "prev_url": "", "total_results": 2, "trunks": [ { "auth_id": "AC000000000000000000", "created_at": "2026-01-15T10:30:00Z", "created_by": "AC000000000000000000", "customer_info": { "auth_id": "AC000000000000000001", "email": "jane.doe@example.com", "firstName": "Jane", "lastName": "Doe" }, "id": "3d6f0a52-8c1e-4b7a-9f2d-1a2b3c4d5e01", "is_recording": false, "metadata": "{}", "modified_by": "AC000000000000000000", "name": "Main PBX trunk", "origination_channel_limit": 1, "origination_cps": 1, "origination_uris": [ { "priority": "10", "status": true, "uri": "sip:pbx.example.com:5060" } ], "status": "active", "termination_channel_limit": 1, "termination_cps": 1, "termination_uris": "acme-trunk.pstn.siprtc.io", "trunk_configuration": "{}", "updated_at": "2026-01-16T08:00:00Z" } ]}The gateway did not supply your company (message “company id is empty”).
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleCustomer_id is not a direct child of your account.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}The trunks could not be read.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}