Phone numbers
Register phone numbers so your agents can receive inbound calls and place outbound calls.
What phone numbers are for
A registered phone number ties a real PSTN number to an Aethex agent. Once registered, inbound calls to that number route straight to the agent; outbound calls from the agent go out through that number's carrier.
Register a Twilio number
Provide the E.164 number, your Twilio account ID (from the Aethex dashboard under Twilio Accounts), and an optional friendly name. Aethex automatically configures the Twilio webhook so inbound calls route to your agent.
curl -X POST https://api.aethexai.com/api/v1/phone-numbers/twilio/register \
-H "X-API-Key: $AETHEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+15551234567",
"twilio_account_id": "<TWILIO_ACCOUNT_UUID>",
"agent_id": "<your-agent-id>",
"friendly_name": "Support line"
}'Register a SIP number
Bringing your own carrier or PBX? Create an inbound trunk via the SIP Trunks API and attach a number here with the trunk_id. Aethex routes inbound calls on that number to your agent. For outbound-only trunks, /sip-trunks/onboard registers numbers for you automatically — skip this step.
curl -X POST https://api.aethexai.com/api/v1/phone-numbers/sip/register \
-H "X-API-Key: $AETHEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+15551234567",
"trunk_id": "<YOUR_TRUNK_UUID>",
"agent_id": "<your-agent-id>"
}'Outbound calls
To place an outbound call, trigger it via POST /calls/trigger with from_number set to the registered number and to_number set to the destination. The agent answers as soon as the callee picks up.For bulk outbound campaigns, use POST /calls/batch to schedule a list of calls.
Inbound routing
Inbound routing is automatic once the number is registered and linked to an agent. To link a number to a specific agent, set agent_id on the phone number registration. Update the routing at any time with PATCH /phone-numbers/{id}.
Verify the registration
After registering, list your phone numbers to confirm the number appears with status: active.
curl https://api.aethexai.com/api/v1/phone-numbers \
-H "X-API-Key: $AETHEX_API_KEY"Lifecycle
To update routing (change the agent a number points to) use PATCH /phone-numbers/{id}. To release a number from Aethex (without cancelling it in Twilio or your carrier), use DELETE /phone-numbers/{id}.
Next
Once you have a number, trigger your first outbound call: see the API reference for Calls for the full POST /calls/trigger contract. To let a number send or answer text messages, see Text messaging.
