List a trunk's phone numbers
const url = 'https://api.siprtc.io/v1/Accounts/example/SipTrunk/example/PhoneNumber?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/example/PhoneNumber?status=active&page=1&limit=30' \ --header 'Authorization: Basic <credentials>'Returns the phone numbers routed over a trunk, newest first, 30 per page by default. phonenumber, countryiso and type match any part of the stored value (any or all disables the countryiso and type filters).
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
ID of the trunk.
Query Parameters
Section titled “ Query Parameters ”Return numbers containing these digits.
Return numbers whose ISO country code contains this text.
Return numbers whose type contains this text.
Return only this status. Default (or any / all): active and inactive.
Page number, starting at 1.
Page size; values above 100 fall back to 30.
Responses
Section titled “ Responses ”One page of trunk phone numbers.
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.
Phone numbers on this page, newest first.
object
Country calling code.
ISO 3166-1 alpha-2 country code.
When the record was created (RFC 3339).
Auth ID of the account that created the record.
Trunk phone number ID (UUID); use it as trunk_number_id.
Auth ID of the account that last changed the record.
Phone number, digits only.
Status of the number on the trunk.
Trunk the number is routed over.
Number type.
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, "trunkphonenumber": [ { "country_code": "1", "country_iso": "US", "created_at": "2026-01-15T10:30:00Z", "created_by": "AC000000000000000000", "id": "7e6d5c4b-3a29-4180-9f7e-6d5c4b3a2901", "modified_by": "AC000000000000000000", "phone_number": "15555550100", "status": "active", "trunk_id": "3d6f0a52-8c1e-4b7a-9f2d-1a2b3c4d5e01", "type": "local", "updated_at": "2026-01-16T08:00:00Z" } ]}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleThe numbers 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"}