Returns one number in your workspace. Use it to check which agents answer, the SIP configuration, and whether provisioning succeeded.
Request#
| Path parameter | Type | Required | Description |
|---|---|---|---|
n |
string | Yes | The number in E.164. URL-encode the leading + as %2B, for example %2B61255501234. |
This endpoint takes no query or body parameters.
Example request#
curl https://api.tried.com.au/get-phone-number/%2B61255501234 \
-H "Authorization: Bearer $TRIED_API_KEY"const n = encodeURIComponent("+61255501234");
const res = await fetch(`https://api.tried.com.au/get-phone-number/${n}`, {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const number = await res.json();import os, requests
from urllib.parse import quote
res = requests.get(
f"https://api.tried.com.au/get-phone-number/{quote('+61255501234')}",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
number = res.json()Response#
200 OK
{
"phone_number": "+61255501234",
"phone_number_pretty": "+61 2 5550 1234",
"nickname": "Sydney front desk",
"provider": "telnyx",
"inbound_agents": [
{ "agent_id": "agent_8d2f61c0a94b3e57d1f0c2a6", "agent_version": 3, "weight": 0.8 },
{ "agent_id": "agent_41b7e9d3c05a2f68e1d94b70", "weight": 0.2 }
],
"outbound_agents": [{ "agent_id": "agent_8d2f61c0a94b3e57d1f0c2a6", "weight": 1 }],
"inbound_webhook_url": "https://example.com/tried/inbound",
"allowed_inbound_country_list": ["AU", "NZ"],
"allowed_outbound_country_list": ["AU"],
"termination_uri": null,
"sip_trunk_auth_username": null,
"last_modification_timestamp": 1792396800000,
"fallback_number": "+61290001234",
"transport": "TCP",
"media_encryption": "allowed",
"sip_trunk_id": null,
"cps_limit": 2,
"livekit_inbound_trunk_id": "ST_4kQm8vWz2RfT",
"livekit_outbound_trunk_id": "ST_9pLx3cHn7YbD",
"livekit_dispatch_rule_id": "SDR_6tJe1sGa5UoK",
"provisioning_status": "provisioned",
"provisioning_error": null,
"spam_flagged": false,
"country_code": "AU",
"monthly_price": 8
}| Field | Type | Description |
|---|---|---|
phone_number |
string | The number in E.164. It is the number's ID. |
phone_number_pretty |
string | Display format: +61 2 5550 1234, +61 412 345 678, +61 1800 555 123 or +1 (415) 555-0123. Other countries return E.164 unchanged. |
nickname |
string or null | Your label. |
provider |
string | telnyx or twilio for numbers bought or carried on those providers, custom for your own SIP trunk. |
inbound_agents |
array | Weighted agents for inbound calls, as { agent_id, agent_version?, weight }. Each call picks one at random in proportion to weight. |
outbound_agents |
array | Weighted agents for outbound calls from this number. |
inbound_webhook_url |
string or null | Receives call_inbound before each inbound call and can override the agent or reject the call. |
allowed_inbound_country_list |
string[] or null | ISO country codes allowed to call in. null allows all. |
allowed_outbound_country_list |
string[] or null | ISO country codes this number may dial. null allows all. |
termination_uri |
string or null | Where outbound calls go for imported numbers. |
sip_trunk_auth_username |
string or null | Outbound digest username. The password is never returned. |
last_modification_timestamp |
integer | Last change, Unix ms. |
fallback_number |
string or null | Inbound callers are sent here when no concurrency slot frees up. |
transport |
string or null | TCP, UDP or TLS. |
media_encryption |
string or null | disabled, allowed or required. |
sip_trunk_id |
string or null | The workspace SIP trunk the number is attached to. |
cps_limit |
number or null | Outbound calls per second. null uses the default: 4 for Telnyx and Twilio numbers, 10 for custom trunks. |
livekit_inbound_trunk_id |
string or null | LiveKit SIP inbound trunk. |
livekit_outbound_trunk_id |
string or null | LiveKit SIP outbound trunk. |
livekit_dispatch_rule_id |
string or null | LiveKit SIP dispatch rule that routes inbound calls to the agent. |
provisioning_status |
string or null | pending, provisioned or error. |
provisioning_error |
string or null | Why provisioning failed, up to 500 characters. |
spam_flagged |
boolean | true once a carrier rejected a call from this number with SIP 608. |
country_code |
string or null | ISO country for purchased numbers. null for imported numbers. |
monthly_price |
number | Monthly price in AUD. Left out for custom numbers. |
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the numbers scope. |
404 |
Phone number +61255501234 not found in this workspace. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.
Retell compatibility#
Same path and method as Retell. The response adds Tried fields such as the LiveKit IDs and provisioning_status.