Skip to content

Add an origination URI to a trunk

POST
/v1/Accounts/{auth_id}/SipTrunk/{trunk_id}/OriginationUri
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/example/SipTrunk/example/OriginationUri \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "customer_auth_id": "AC000000000000000001", "meta_data": "primary site", "priority": "10", "sip_uri": "sip:pbx.example.com:5060", "status": true }'

Adds an origination URI to a trunk: a SIP URI that SIPRTC sends inbound calls for the trunk’s phone numbers to, tried in priority order (lowest first). A trunk can have at most 5 origination URIs and the same SIP URI cannot be added twice. priority must be a whole number sent as a string. The URI is registered in the SIP edge’s routing cache when it is created. 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 origination URI to add.

Media type application/json
object
customer_auth_id

Vendor accounts only: create the URI on behalf of this direct child account.

string

Example

AC000000000000000001
meta_data

Free-form text stored with the URI.

string

Example

primary site
priority

Priority as a decimal string; lower is tried first. Must be a number.

string

Example

10
sip_uri
required

SIP URI that inbound calls for the trunk’s numbers are sent to.

string

Example

sip:pbx.example.com:5060
status

Whether the URI is enabled.

boolean

Example

true

The new origination URI.

Media type application/json
object
created_at

When the record was created (RFC 3339).

string
created_by

Auth ID of the account that created the record.

string
id

Origination URI ID (UUID).

string
meta_data

Free-form text stored with the URI.

string
modified_by

Auth ID of the account that last changed the record.

string
priority

Priority as a decimal string; lower is tried first.

string
sip_uri

SIP URI inbound calls are sent to.

string
status

Whether the URI is enabled.

boolean
trunk_id

Trunk the URI belongs to.

string
updated_at

When the record was last changed (RFC 3339).

string

Example

{
"created_at": "2026-01-15T10:30:00Z",
"created_by": "AC000000000000000000",
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c01",
"meta_data": "primary site",
"modified_by": "AC000000000000000000",
"priority": "10",
"sip_uri": "sip:pbx.example.com:5060",
"status": true,
"trunk_id": "3d6f0a52-8c1e-4b7a-9f2d-1a2b3c4d5e01",
"updated_at": "2026-01-16T08:00:00Z"
}

Sip_uri is missing, the limit is reached, the URI already exists, priority is not a number, or (with customer_auth_id) 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"
}