Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt

Use this file to discover all available pages before exploring further.

SIP Attach is the Telnyx product for connecting your existing PBX or SIP platform directly to Telnyx. To use SIP Attach, create a UAC Connection. A UAC Connection lets Telnyx register to your PBX as a SIP endpoint. This is the reverse of a typical SIP Credential Connection, where your PBX registers to Telnyx. After registration succeeds, calls can move between your PBX and Telnyx resources, such as AI Assistants or Call Control Applications, over SIP. This lets you connect existing SIP infrastructure to Telnyx services without adding a PSTN phone-number hop.

Create a Connection

POST /v2/uac_connections
curl -X POST https://api.telnyx.com/v2/uac_connections \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_name": "My UAC Connection"
  }'
connection_name is the only required field. You can also provide user_name and password at creation time — if omitted, Telnyx auto-generates them.
curl -X POST https://api.telnyx.com/v2/uac_connections \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_name": "My UAC Connection",
    "user_name": "my-sip-user",
    "password": "my-sip-password"
  }'

Connection Fields

Note: fqdn and registration_status are automatically generated by Telnyx. user_name and password are auto-generated if not provided.

External Settings (external_uac_settings)

These are the SIP credentials Telnyx uses to register to your PBX. The proxy field is required — it’s the SIP server address Telnyx will register to. username and password are the SIP credentials for that registration. transport specifies the transport protocol (TCP, UDP, or TLS). PATCH /v2/uac_connections/{id}
curl -X PATCH https://api.telnyx.com/v2/uac_connections/{id} \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_uac_settings": {
      "proxy": "sip:pbx.example.com:5060",
      "username": "telnyx-reg",
      "password": "s3cret",
      "transport": "TCP"
    }
  }'

Internal Settings (internal_uac_settings)

These route inbound calls from the PBX to a Telnyx application. The key field is destination_uri — a SIP URI that tells Telnyx where to send the call.

destination_uri format

<extension>@<applicationFQDN>.sip.telnyx.com
PartDescription
extensionPBX extension or dial string
applicationFQDNTelnyx application FQDN (e.g. assistant-<uuid> for AI Assistant, cc-app-<id> for Call Control, stt-<id> for Speech-to-Text)
Examples:
destination_uriRoutes to
1006@assistant-abc123.sip.telnyx.comExtension 1006 → AI Assistant (UUID abc123)
2000@cc-app-xyz789.sip.telnyx.comExtension 2000 → Call Control app (ID xyz789)
PATCH /v2/uac_connections/{id}
curl -X PATCH https://api.telnyx.com/v2/uac_connections/{id} \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "internal_uac_settings": {
      "destination_uri": "1006@assistant-abc123.sip.telnyx.com"
    }
  }'

Full Example

Create a UAC connection with all settings in a single request:
curl -X POST https://api.telnyx.com/v2/uac_connections \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_name": "Office PBX",
    "user_name": "my-sip-user",
    "password": "my-sip-password",
    "external_uac_settings": {
      "proxy": "sip:pbx.example.com:5060",
      "username": "telnyx-reg",
      "password": "s3cret",
      "transport": "TCP"
    },
    "internal_uac_settings": {
      "destination_uri": "1006@assistant-abc123.sip.telnyx.com"
    }
  }'

Manage Connections

# List all UAC connections
curl https://api.telnyx.com/v2/uac_connections \
  -H "Authorization: Bearer $TELNYX_API_KEY"

# Get a specific connection
curl https://api.telnyx.com/v2/uac_connections/{id} \
  -H "Authorization: Bearer $TELNYX_API_KEY"

# Delete a connection
curl -X DELETE https://api.telnyx.com/v2/uac_connections/{id} \
  -H "Authorization: Bearer $TELNYX_API_KEY"