---
title: "Delete a SIP trunk"
method: DELETE
path: "/api/v1/trunks/{id}"
tags: ["sip"]
---

# Delete a SIP trunk

`DELETE /api/v1/trunks/{id}`

## Request

- Base URL: `https://www.callagent.pro`
- URL: `https://www.callagent.pro/api/v1/trunks/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` integer, required

## Response `200`

Deleted. Returns the whole refreshed connections view.

- object
  - `ok` boolean
  - `connections` Connections: Trunk and SIP-account mutations answer with the whole refreshed connections view rather than the single record you changed, because that is what the dashboard re-renders. Read your result out of these arrays.
    - `trunks` Trunk[], required
      - `id` integer, required
      - `name` string, required: Display name — what you sent as trunk_name
      - `provider` string, required
      - `provider_label` string, required: Human-readable provider name
      - `host` string, required
      - `port` integer, required
      - `username` string, required
      - `true` boolean: Enabled
      - `status` string, required: Live registration state, e.g. active
      - `is_default` boolean, required
      - `inbound_assistant_id` integer, nullable, required: Agent that answers calls arriving on this trunk
      - `calls` integer, required
      - `dur` string, required: Total talk time, HH:MM or MM:SS
    - `sip_accounts` SipAccount[], required
      - `id` integer, required
      - `user` string, required: The extension/username a device registers with
      - `name` string, nullable, required
      - `role` string, required
      - `agent` string, required: Name of the agent this extension reaches
      - `dir` string, required: Short direction label
      - `direction` 'inbound' | 'outbound' | 'both', required
      - `true` boolean
      - `status` string, required: Live registration state
      - `ip` string, required: Address it registered from
      - `ping` integer, required: Round-trip ms to the device
      - `device` string, required
      - `device_ua` string, required: Raw SIP User-Agent
      - `last` string, required: Last seen, humanized
      - `created` string, required
      - `calls` integer, required
      - `dur` string, required
    - `server` string, required: SIP host these register against

## Other responses

- `401`: Missing or invalid Bearer key
- `429`: Too many requests — see the endpoint's rate limit tier (agent-api 120/min, agent-api-heavy 6/min, agent-api-secrets 10/min)

---

[API](https://skmtc.dev/callagent/apis/callagent-pro-agent-api.md) · [All operations](https://skmtc.dev/callagent/apis/callagent-pro-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/callagent/apis/callagent-pro-agent-api/revisions/38072cf8a24b?raw)
