Skip to content

Add phone numbers to a trunk

POST
/v1/Accounts/{auth_id}/SipTrunk/{trunk_id}/PhoneNumber
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/example/SipTrunk/example/PhoneNumber \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "customer_auth_id": "AC000000000000000001", "phone_number": [ "15555550100" ] }'

Routes phone numbers over a trunk. Numbers already on a trunk are skipped, and the request fails with 400 when all of them are. Numbers that are not in the SIPRTC number inventory are ignored. Each number is stored with its country, ISO code and type from the inventory and status active. Vendor accounts can act for a direct child account with customer_auth_id.

auth_id
required
string

Auth ID of your account.

trunk_id
required
string

ID of the trunk.

The numbers to add.

Media type application/json
object
customer_auth_id

Vendor accounts only: add the numbers on behalf of this direct child account.

string

Example

AC000000000000000001
phone_number

Phone numbers to route over the trunk, digits only without “+”. Numbers already on a trunk are skipped; numbers not in the SIPRTC number inventory are ignored.

Array<string>

Example

[
"15555550100"
]

The numbers that were added.

Media type application/json
Array<object>
object
country_code

Country calling code.

string
country_iso

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

Number type.

string
updated_at

When the record was last changed (RFC 3339).

string

Example

[
{
"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"
}
]

Every number is already on a trunk, the numbers could not be stored, or the gateway did not supply your company (message “company id is empty”).

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"
}

Missing or wrong Basic-auth credentials (returned by the API gateway).

Media type application/json
string

Example generated

example

Customer_auth_id is not a direct child account of a vendor you belong to, or its parent is not a vendor.

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"
}

The customer account could not be looked up.

Media type application/json
object
error

Underlying error reported by the account lookup.

string
message

Human-readable explanation of the failure.

string
status

Always “failed”.

string

Example

{
"error": "account not found",
"message": "Error fetching account details",
"status": "failed"
}