Skip to content

List a trunk's phone numbers

GET
/v1/Accounts/{auth_id}/SipTrunk/{trunk_id}/PhoneNumber
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).

auth_id
required
string

Auth ID of your account.

trunk_id
required
string

ID of the trunk.

phonenumber
string

Return numbers containing these digits.

countryiso
string

Return numbers whose ISO country code contains this text.

type
string

Return numbers whose type contains this text.

status
string
Allowed values: active inactive any all

Return only this status. Default (or any / all): active and inactive.

page
integer
default: 1

Page number, starting at 1.

limit
integer
default: 30

Page size; values above 100 fall back to 30.

One page of trunk phone numbers.

Media type application/json
object
base_url

The request URL the page links are built from.

string
current_page

Page number that was returned (1-based).

integer
last_page

Number of the last page.

integer
next_url

Link to the next page; omitted on the last page.

string
per_page

Page size that was applied.

integer
prev_url

Link to the previous page; omitted on the first page.

string
total_results

Total number of matching records across all pages.

integer
trunkphonenumber

Phone numbers on this page, newest first.

Array<object>
object
country_code
required

Country calling code.

string
country_iso
required

ISO 3166-1 alpha-2 country code.

string
created_at

When the record was created (RFC 3339).

string
created_by

Auth ID of the account that created the record.

string
id

Trunk phone number ID (UUID); use it as trunk_number_id.

string
modified_by

Auth ID of the account that last changed the record.

string
phone_number

Phone number, digits only.

string
status

Status of the number on the trunk.

string
Allowed values: active inactive
trunk_id

Trunk the number is routed over.

string
type
required

Number type.

string
updated_at

When the record was last changed (RFC 3339).

string

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).

Media type application/json
string

Example generated

example

The numbers could not be read.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}