Phone numbers
Call from an Agoralia pool number auto-assigned per destination country, or bring your own number from Telnyx, Twilio, Vonage, Sinch, Bird, Infobip, Bandwidth, or SIP.
Phone numbers
Every outbound call needs a number to call from. You have two options: use a number from the Agoralia pool (auto-assigned per destination country), or bring your own (BYO) from Telnyx, Twilio, Vonage, Sinch, Bird, Infobip, Bandwidth, or SIP.
Pool numbers (auto-assign)
When a campaign has no phone_number_id, the launch pre-flight picks the best pool number
for the destination countries of your contacts — preferring a number whose country matches
the most leads, then falling back to any active pool number. You do not have to manage this:
just leave the campaign's number unset and the system assigns one at launch.
When auto-assign can't help
If there is no pool number for the lead countries, the pre-flight returns a
phone_number requirement asking you to link your own. See the
Campaigns pre-flight gate.
For single calls (POST /calls), phone_number_id is required — there is no
auto-assign on a one-off call. Pick one from list_numbers / GET /phone-numbers.
Bring your own (BYO)
Link a number you already own from Telnyx, Twilio, Vonage, Sinch, Bird, Infobip, Bandwidth, or SIP. Agoralia validates it on the provider and registers it with the voice layer. For every provider except SIP, connect the carrier's API credentials first (see Connect a carrier).
curl -X POST https://api.agoralia.app/api/v1/phone-numbers/link \
-H "X-API-Key: ag_..." \
-H "Content-Type: application/json" \
-d '{
"number": "+14155550123",
"provider": "twilio",
"country_code": "US"
}'| Field | Required | What it is |
|---|---|---|
number | yes | The number in E.164 form (e.g. +14155550123). |
provider | yes | One of telnyx, twilio, vonage, sinch, bird, infobip, bandwidth, sip. |
provider_number_id | — | The provider's id for the number, if you have it. |
country_code | — | 2-letter country. Auto-detected from the number when omitted. |
The response includes the new number's id — use that as phone_number_id when placing
calls or assigning it to a campaign. Linked (BYO) numbers have pool: false; pool numbers
have pool: true. bandwidth is US/Canada only.
Connect a carrier (BYO credentials)
Before linking a number from Telnyx, Twilio, Vonage, Sinch, Bird, Infobip, or Bandwidth, connect that carrier's API credentials once. They are verified against the provider and stored encrypted. SIP needs no credentials.
curl -X POST https://api.agoralia.app/api/v1/integrations/connect \
-H "X-API-Key: ag_..." \
-H "Content-Type: application/json" \
-d '{
"provider": "twilio",
"credentials": { "account_sid": "AC...", "auth_token": "..." }
}'Required credential fields per provider:
| Provider | Credentials |
|---|---|
telnyx | api_key (+ optional messaging_profile_id) |
twilio | account_sid, auth_token |
vonage | api_key, api_secret |
sinch | project_id, access_key, access_secret (numbers/voice). For SMS also service_plan_id, api_token |
bird | access_key (for SMS, optional sms_channel_id) |
infobip | api_key, host |
bandwidth | username, password, account_id, application_id |
The response includes sms_ready and sms_missing so you can tell whether the connected
credentials are enough to also send SMS — see Messaging.
List & inspect
curl https://api.agoralia.app/api/v1/phone-numbers \
-H "X-API-Key: ag_..."list_numbers()Each number returns id, number, country_code, provider, pool, is_active, and the
voice-provider registration id.
Inbound
A number can also answer inbound calls — route them to a default agent and/or an external
assistant-request server with PUT /phone-numbers/{id}/inbound. The HMAC signing secret is
returned once, on first set or rotation.
Next
- Agents — what does the talking.
- Single call · Campaigns
Agents
Create, configure (system_prompt, language, voice) and publish a voice agent through MCP, REST, or the CLI. Publishing is required before an agent can place a call.
Knowledge base
Attach a semantic knowledge base to an agent so it can answer from your own facts — add sources from text, Q&A pairs, or URLs.