Skip to content

Add a termination URI to a trunk

POST
/v1/Accounts/{auth_id}/SipTrunk/{trunk_id}/TerminationUri
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/example/SipTrunk/example/TerminationUri \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "authecredentiallist_ids": [ "6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01" ], "customer_auth_id": "AC000000000000000001", "ipaccesscontrollist_ids": [ "0b8e7f4a-3c2d-4e1f-8a9b-7c6d5e4f3a01" ], "sip_domain": "acme-trunk.pstn.siprtc.io" }'

Adds a termination URI to a trunk: the SIP domain your PBX sends outbound calls to, with the credential lists and IP access control lists that authenticate those calls. List IDs that do not exist are dropped. A trunk can have at most 5 termination URIs. The URI is published to 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 termination URI to add.

Media type application/json
object
authecredentiallist_ids

IDs of credential lists whose credentials may authenticate calls. Unknown IDs are ignored.

Array<string>

Example

[
"6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01"
]
customer_auth_id

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

string

Example

AC000000000000000001
ipaccesscontrollist_ids

IDs of IP access control lists whose addresses may send calls. Unknown IDs are ignored.

Array<string>

Example

[
"0b8e7f4a-3c2d-4e1f-8a9b-7c6d5e4f3a01"
]
sip_domain
required

SIP domain the PBX sends outbound calls to.

string

Example

acme-trunk.pstn.siprtc.io

The new termination URI.

Media type application/json
object
authecredentiallist_id

The credential lists, resolved to ID and name. Filled by GET only.

Array<object>
object
friendly_name

Credential list name.

string
id

Credential list ID.

string
authecredentiallist_ids

JSON-encoded array of credential list IDs, as stored.

string
created_at

When the record was created (RFC 3339).

string
created_by

Auth ID of the account that created the record.

string
id

Termination URI ID (UUID).

string
ipaccesscontrollist_id

The IP access control lists, resolved to ID and name. Filled by GET only.

Array<object>
object
ip_acl_id

IP access control list ID.

string
ip_acl_name

IP access control list name.

string
ipaccesscontrollist_ids

JSON-encoded array of IP access control list IDs, as stored.

string
modified_by

Auth ID of the account that last changed the record.

string
sip_domain

SIP domain the PBX sends outbound calls to.

string
status

Status of the URI.

string
Allowed values: active inactive
trunk_id

Trunk the URI belongs to.

string
updated_at

When the record was last changed (RFC 3339).

string

Example

{
"authecredentiallist_id": [
{
"friendly_name": "PBX credentials",
"id": "6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01"
}
],
"authecredentiallist_ids": "[\"6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01\"]",
"created_at": "2026-01-15T10:30:00Z",
"created_by": "AC000000000000000000",
"id": "4c3b2a19-0f8e-4d7c-9b6a-5e4d3c2b1a01",
"ipaccesscontrollist_id": [
{
"ip_acl_id": "0b8e7f4a-3c2d-4e1f-8a9b-7c6d5e4f3a01",
"ip_acl_name": "Office IPs"
}
],
"ipaccesscontrollist_ids": "[\"0b8e7f4a-3c2d-4e1f-8a9b-7c6d5e4f3a01\"]",
"modified_by": "AC000000000000000000",
"sip_domain": "acme-trunk.pstn.siprtc.io",
"status": "active",
"trunk_id": "3d6f0a52-8c1e-4b7a-9f2d-1a2b3c4d5e01",
"updated_at": "2026-01-16T08:00:00Z"
}

Sip_domain is missing, the limit is reached, the URI could not be stored or published, 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"
}