VoxLink.ai

API Reference

Update SIP trunk

Update an existing SIP trunk configuration

Updated 30 June 2026

This endpoint updates an existing SIP trunk. Only include the fields you want to change — partial updates are supported. Changing credentials, address, or proxy settings automatically re-provisions the affected voice infrastructure trunks.

Path Parameters

idintegerrequired

The unique identifier of the SIP trunk to update

Body Parameters

All fields are optional. Only send the fields you want to update.

phone_numberstring

The SIP extension or phone number (1-15 characters)

nicknamestring

A short, human-friendly label for the trunk. Maximum 50 characters. Send null to clear it.

sip_usernamestring

Username for SIP authentication (3-128 characters)

sip_passwordstring

Password for SIP authentication (minimum 3 characters)

sip_addressstring

The SIP server address without port

sip_calling_formatstring

The outbound calling number format: +e164, e164, or national

inbound_authorization_typestring

How inbound calls are authenticated: auth or ip. When switching to ip, you must also provide allowed_inbound_ips. When switching to auth, any existing IP whitelist is cleared.

allowed_inbound_ipsarray

Array of IP addresses allowed for inbound calls. Required when inbound_authorization_type is set to ip.

country_codestring

ISO 3166-2 country code

outbound_proxyboolean

Route outbound calls through a fixed IP address

Response

messagestring

Success message

dataobject

The updated SIP trunk object (same fields as Get SIP trunk)

{
  "message": "SIP trunk updated successfully.",
  "data": {
    "id": 42,
    "phone_number": "1000",
    "nickname": "Provider X — Main",
    "sip_username": "new_username",
    "sip_address": "sip.provider.com",
    "sip_calling_format": "+e164",
    "inbound_authorization_type": "auth",
    "allowed_inbound_ips": null,
    "outbound_proxy": false,
    "country_code": "US",
    "inbound_trunk_id": "ST_newtrunkid1",
    "outbound_trunk_id": "ST_newtrunkid2",
    "created_at": "2026-03-31T10:00:00.000000Z",
    "updated_at": "2026-03-31T12:00:00.000000Z"
  }
}
{
  "message": "SIP trunk updated successfully.",
  "data": {
    "id": 42,
    "phone_number": "1000",
    "nickname": "Provider X — Main",
    "sip_username": "myuser",
    "sip_address": "sip.provider.com",
    "sip_calling_format": "+e164",
    "inbound_authorization_type": "ip",
    "allowed_inbound_ips": ["203.0.113.10"],
    "outbound_proxy": false,
    "country_code": "US",
    "inbound_trunk_id": "ST_newtrunkid1",
    "outbound_trunk_id": "ST_yyyyyyyyyyyy",
    "created_at": "2026-03-31T10:00:00.000000Z",
    "updated_at": "2026-03-31T12:00:00.000000Z"
  }
}
{
  "error": "SIP trunk not found."
}
{
  "message": "The given data was invalid.",
  "errors": {
    "allowed_inbound_ips": ["At least one allowed IP address is required when authorization type is \"ip\"."]
  }
}
{
  "error": "Failed to update SIP trunk. Please try again or contact support."
}

Re-provisioning behavior

The following field changes trigger automatic re-provisioning of voice infrastructure trunks:

Field changed Inbound trunk Outbound trunk
sip_username Re-created Re-created
sip_password Re-created Re-created
sip_address Re-created
phone_number Re-created Re-created
inbound_authorization_type Re-created
allowed_inbound_ips Re-created
outbound_proxy Re-created

Fields like sip_calling_format, country_code are stored locally and do not trigger re-provisioning.

Related guides