# List SIP trunks (/api-reference/phone-numbers/listSipTrunks)

## GET /api/v1/sip-trunks

Operation ID: `listSipTrunks`
List SIP trunks
Your own SIP providers connected to the calling gateway, the numbers on each, and the gateway address to give your provider. Passwords are never returned.

### Responses

#### 200 OK

Example (example):

```json
{
  "gateway": {
    "allowIp": "sip.callmitra.example",
    "enabled": true,
    "host": "sip.callmitra.example",
    "inboundUri": "sip:<number>@sip.callmitra.example:5060",
    "port": 5060
  },
  "success": true,
  "trunks": [
    {
      "authMode": "digest",
      "authRealm": "",
      "codecs": [
        "ulaw",
        "alaw"
      ],
      "dtmfMode": "rfc4733",
      "fromDomain": "",
      "fromUser": "",
      "hasPassword": true,
      "host": "sip.provider.example",
      "id": "5b0c2d4e-8f1a-4b3c-9d2e-7f6a5b4c3d21",
      "inboundIps": [
        "203.0.113.10"
      ],
      "isActive": true,
      "lastError": "",
      "maxConcurrentCalls": 10,
      "name": "Acme SIP",
      "numberFormat": "e164",
      "numbers": [
        {
          "e164": "+918045671234",
          "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
          "inboundAgentId": "4f6d2c1a-9b7e-4c3d-8a21-5e0f7b9c1d23",
          "label": "Support line"
        }
      ],
      "outboundProxy": "",
      "port": 5060,
      "register": true,
      "status": "active",
      "syncedAt": "2026-11-12T09:30:00Z",
      "techPrefix": "",
      "transport": "udp",
      "username": "acme01"
    }
  ]
}
```

#### 400 Bad request: `workspace_required`.

Example (Merchant workspace required):

```json
{
  "detail": "Merchant workspace required",
  "error": {
    "code": "workspace_required",
    "docUrl": "https://docs.callmitra.ai/errors/workspace_required",
    "message": "Merchant workspace required",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "invalid_request_error"
  }
}
```

#### 401 Unauthorized: `api_key_expired`, `invalid_api_key`, `unauthenticated`.

Example (The API key has expired.):

```json
{
  "detail": "The API key has expired.",
  "error": {
    "code": "api_key_expired",
    "docUrl": "https://docs.callmitra.ai/errors/api_key_expired",
    "message": "The API key has expired.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "authentication_error"
  }
}
```

Example (The API key is invalid or has been revoked.):

```json
{
  "detail": "The API key is invalid or has been revoked.",
  "error": {
    "code": "invalid_api_key",
    "docUrl": "https://docs.callmitra.ai/errors/invalid_api_key",
    "message": "The API key is invalid or has been revoked.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "authentication_error"
  }
}
```

Example (Authentication required.):

```json
{
  "detail": "Authentication required.",
  "error": {
    "code": "unauthenticated",
    "docUrl": "https://docs.callmitra.ai/errors/unauthenticated",
    "message": "Authentication required.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "authentication_error"
  }
}
```

#### 403 Forbidden: `api_key_scope_denied`, `permission_denied`.

Example (The API key does not have the scope required for this request.):

```json
{
  "detail": "The API key does not have the scope required for this request.",
  "error": {
    "code": "api_key_scope_denied",
    "docUrl": "https://docs.callmitra.ai/errors/api_key_scope_denied",
    "message": "The API key does not have the scope required for this request.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "permission_error"
  }
}
```

Example (You do not have permission to perform this action.):

```json
{
  "detail": "You do not have permission to perform this action.",
  "error": {
    "code": "permission_denied",
    "docUrl": "https://docs.callmitra.ai/errors/permission_denied",
    "message": "You do not have permission to perform this action.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "permission_error"
  }
}
```

#### 429 Too many requests: `rate_limit_exceeded`.

Example (Too many requests. Slow down and retry later.):

```json
{
  "detail": "Too many requests. Slow down and retry later.",
  "error": {
    "code": "rate_limit_exceeded",
    "docUrl": "https://docs.callmitra.ai/errors/rate_limit_exceeded",
    "message": "Too many requests. Slow down and retry later.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "rate_limit_error"
  }
}
```

#### 500 Server error: `internal_error`.

Example (Something went wrong on our side.):

```json
{
  "detail": "Something went wrong on our side.",
  "error": {
    "code": "internal_error",
    "docUrl": "https://docs.callmitra.ai/errors/internal_error",
    "message": "Something went wrong on our side.",
    "param": null,
    "requestId": "req_5f1c2e9b7a3d4c0e8b6a1f2d3c4b5a69",
    "type": "api_error"
  }
}
```

### Error codes

- [`workspace_required`](/errors/workspace_required)
- [`api_key_expired`](/errors/api_key_expired)
- [`invalid_api_key`](/errors/invalid_api_key)
- [`unauthenticated`](/errors/unauthenticated)
- [`api_key_scope_denied`](/errors/api_key_scope_denied)
- [`permission_denied`](/errors/permission_denied)
- [`rate_limit_exceeded`](/errors/rate_limit_exceeded)
- [`internal_error`](/errors/internal_error)
