# List agent inbound links

> GET https://api.nabrah.ai/api/ext/agent-inbound-link

Group: Agent inbound links. Page: https://www.nabrah.ai/en/docs/api-reference/agent-inbound-links/list-agent-inbound-links

Returns every agent↔inbound-trunk link in the workspace tied to your API key. A link is what makes an agent answer calls arriving on a SIP inbound trunk. The relationship is many-to-many: one trunk can carry several agents, and one agent can serve several trunks. Each item carries the `link_id` you need to remove it later via DELETE /api/ext/agent-inbound-link/{link_id}.

## What each item contains

- **link_id**: The identifier of the association itself — not the agent and not the trunk. Pass it to DELETE /api/ext/agent-inbound-link/{link_id} to de-link. Fields: `link_id`.
- **agent and sip_inbound**: `agent` echoes the linked agent's `agent_id` and `name`; `sip_inbound` echoes the trunk's `id` and its `numbers` string. Use these to tell links apart without extra lookups. Fields: `agent`, `sip_inbound`.

## Scope

- **Workspace only**: Only links belonging to the workspace behind your API key are returned. There is no pagination — the full list comes back in one response.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "links": [
    {
      "link_id": "00000000-0000-4000-8000-000000000000",
      "agent": {
        "agent_id": "00000000-0000-4000-8000-000000000000",
        "name": "string"
      },
      "sip_inbound": {
        "id": "00000000-0000-4000-8000-000000000000",
        "numbers": "string"
      },
      "project_id": "00000000-0000-4000-8000-000000000000",
      "created_at": "2026-01-15T12:00:00.000Z"
    }
  ]
}
```

## Request examples

### cURL

```bash
curl --request GET \
  --url 'https://api.nabrah.ai/api/ext/agent-inbound-link' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/agent-inbound-link"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/agent-inbound-link", {
  method: "GET",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.nabrah.ai/api/ext/agent-inbound-link", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
