aethexDocs
Telnyx logo
Telephony

Telnyx

Bring your own Telnyx number. Add your API key and Aethex provisions a SIP trunk and points the number at an agent, with no carrier-portal setup.

How it works

You give Aethex a Telnyx API key once. When you connect a number, Aethex drives the Telnyx API for you: it creates a SIP connection pointed at the Aethex edge, assigns your number to it, and stands up the matching SIP trunk. Inbound calls to that number reach your agent, and outbound calls dial through your own Telnyx account. You never open the Telnyx portal or copy SIP credentials by hand.

Connect a number

Link your account with an API key, then connect a number and point it at an agent. The key is validated against Telnyx before it is stored, encrypted at rest, and never returned in a response.

Link, then connect
bash
# 1. Link your Telnyx account (validated, then stored encrypted)
curl -X POST https://api.aethexai.com/api/v1/integrations/telephony/carriers \
  -H "X-API-Key: $AETHEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "provider": "telnyx", "api_key": "KEY0123...your-telnyx-api-key" }'

# 2. Connect a number and point it at an agent
curl -X POST https://api.aethexai.com/api/v1/integrations/telephony/carriers/$ID/connect \
  -H "X-API-Key: $AETHEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone_number": "+14155550100", "agent_id": "<your-agent-id>" }'

What you get

A working register-style SIP trunk, your number routed to the agent you chose for inbound calls, and outbound calling through your Telnyx account. If any step fails, Aethex rolls the Telnyx-side objects back so a retry starts clean.

Note
One active Telnyx account per workspace. Release the current one before linking another.

API reference

For every request and response field, see the Carrier Accounts API reference.