curl https://api.60db.ai/agents/phone-lines/LINE_ID/setup \
-H "Authorization: Bearer your-api-key"
const res = await fetch(`https://api.60db.ai/agents/phone-lines/${lineId}/setup`, {
headers: { Authorization: `Bearer ${process.env.SIXTYDB_API_KEY}` },
});
if (!res.ok) throw new Error(`setup failed: ${res.status}`);
const { data } = await res.json();
import os, requests
r = requests.get(
f"https://api.60db.ai/agents/phone-lines/{line_id}/setup",
headers={"Authorization": f"Bearer {os.environ['SIXTYDB_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
data = r.json()["data"]
Agents
Get Phone Line Setup
What to enter at your carrier for a phone line, and what is still missing
GET
/
agents
/
phone-lines
/
{lineId}
/
setup
curl https://api.60db.ai/agents/phone-lines/LINE_ID/setup \
-H "Authorization: Bearer your-api-key"
const res = await fetch(`https://api.60db.ai/agents/phone-lines/${lineId}/setup`, {
headers: { Authorization: `Bearer ${process.env.SIXTYDB_API_KEY}` },
});
if (!res.ok) throw new Error(`setup failed: ${res.status}`);
const { data } = await res.json();
import os, requests
r = requests.get(
f"https://api.60db.ai/agents/phone-lines/{line_id}/setup",
headers={"Authorization": f"Bearer {os.environ['SIXTYDB_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
data = r.json()["data"]
Read-only guide for a phone line: the SIP address to give your carrier, the numbers it answers, the number format it expects, the source rules, and
warnings for anything missing. Nothing is enforced by it. An open line keeps working, and the guide only tells you.
It is read from the stored line and is not on any call’s path. See Bring your own SIP for the full setup.
Request
Headers
string
required
Bearer token with your API key (scope
agents)Path
string
required
The phone line
id (UUID)Response
200 OK{
"success": true,
"data": {
"sip": {
"host": "hellokit-sip.60db.ai",
"port": 5060,
"transport": "udp",
"codecs": ["PCMU", "PCMA"],
"request_uri_example": "sip:[email protected]:5060;transport=udp"
},
"numbers": ["+15550301"],
"number_format": {
"request_uri_user_part": "E.164 with a leading +",
"normalize_numbers": false,
"default_country_code": null
},
"source_rules": { "allowed_addresses": ["203.0.113.7"], "uses_server_list": false },
"warnings": []
}
}
| Field | Meaning |
|---|---|
sip | What to give the carrier: host, port, transport (udp), codecs and an example request URI |
numbers | Every number the line answers: inbound_number plus numbers |
number_format | How the called number must be written, and the line’s normalize_numbers and default_country_code |
source_rules | The line’s allowed_addresses, and whether a shared list is used instead because the line has none |
warnings | A list of { code, message } |
| Warning code | Meaning |
|---|---|
no_number | The line has no inbound_number and no numbers, so no call can reach it |
no_agent | No agent is attached, so a call is refused with 404 |
open_trunk | No allowed_addresses, so any source may send calls billed to your workspace. Set allowed_addresses |
no_public_host | The address to give the carrier is unknown |
inbound_disabled | Inbound listening is not available on this environment yet |
Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | PHONE_LINE_NOT_FOUND | No phone line with this ID in your workspace |
Example
curl https://api.60db.ai/agents/phone-lines/LINE_ID/setup \
-H "Authorization: Bearer your-api-key"
const res = await fetch(`https://api.60db.ai/agents/phone-lines/${lineId}/setup`, {
headers: { Authorization: `Bearer ${process.env.SIXTYDB_API_KEY}` },
});
if (!res.ok) throw new Error(`setup failed: ${res.status}`);
const { data } = await res.json();
import os, requests
r = requests.get(
f"https://api.60db.ai/agents/phone-lines/{line_id}/setup",
headers={"Authorization": f"Bearer {os.environ['SIXTYDB_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
data = r.json()["data"]