curl -X PATCH https://api.60db.ai/agents/phone-lines/LINE_ID \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"agent_id": "AGENT_ID", "name": "Front desk line"}'
await client.agents.phoneLines.update(lineId, { agentId, name: 'Front desk line' });
client.agents.phone_lines.update(line_id, agent_id=agent_id, name="Front desk line")
Agents
Update Phone Line
Change a phone line’s name, agent, or SIP details
PATCH
/
agents
/
phone-lines
/
{lineId}
curl -X PATCH https://api.60db.ai/agents/phone-lines/LINE_ID \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"agent_id": "AGENT_ID", "name": "Front desk line"}'
await client.agents.phoneLines.update(lineId, { agentId, name: 'Front desk line' });
client.agents.phone_lines.update(line_id, agent_id=agent_id, name="Front desk line")
Change a phone line. Send only the fields you want to change.
- Both kinds:
name,agent_id(set tonullto detach the agent). - 60db number (
sixtydb):inbound. The SIP login is managed by 60db, so SIP fields are rejected with400 VALIDATION_ERROR. - Your own trunk (
byo):domain,username,password,caller_id,inbound_number.
Request
Headers
string
required
Bearer token with your API key (scope
agents)string
required
application/json
Path
string
required
The phone line
id (UUID)Body
string
1–64 characters
string | null
The agent that calls from this line (UUID), or
null to detach itboolean
60db numbers only. Must be
false for nowstring
BYO only. SIP host name, optionally with a port
string
BYO only. 1–128 characters
string
BYO only. 1–256 characters. Never returned
string
BYO only. E.164 format
string | null
BYO only. Must be
null for nowResponse
200 OK. The updated phone line.Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | A field is invalid, or a SIP field was sent for a 60db number. field names it |
| 404 | PHONE_LINE_NOT_FOUND | No phone line with this ID in your workspace |
| 404 | AGENT_NOT_FOUND | agent_id is not an agent in your workspace |
| 409 | LINE_NAME_TAKEN | Another phone line uses this name |
| 422 | INBOUND_NOT_AVAILABLE | Inbound calls are not available yet |
| 502 | AGENTS_UPSTREAM_UNAVAILABLE | The call runtime could not apply the change. It was reverted. Retry shortly |
Example
curl -X PATCH https://api.60db.ai/agents/phone-lines/LINE_ID \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"agent_id": "AGENT_ID", "name": "Front desk line"}'
await client.agents.phoneLines.update(lineId, { agentId, name: 'Front desk line' });
client.agents.phone_lines.update(line_id, agent_id=agent_id, name="Front desk line")