# List Instagram accounts

> GET https://api.nabrah.ai/api/ext/omni_v2/instagram/inboxes

Group: Instagram. Page: https://www.nabrah.ai/en/docs/api-reference/instagram/list-instagram-accounts

List the Instagram accounts connected to the project, oldest first. Each entry includes its `id`, display `name`, `username`, `avatar_url`, whether it needs reconnecting (`disconnected`), `created_at`, and the agent answering on it. Use the returned `id` as the `inbox_id` for the other Instagram endpoints.

## Where inbox IDs come from

This is the canonical source for `inbox_id` values used by the other Instagram endpoints.

- **inboxes[].id**: The UUID of each Instagram account. Pass it as `inbox_id` to the other Instagram endpoints, or as the `{inbox_id}` path parameter to get one account. Fields: `id`, `name`, `username`, `avatar_url`, `created_at`.
- **Answering agent**: The agent auto-replying on the account, or null when none is assigned. Fields: `agent_id`, `agent_name`.
- **disconnected**: True when the account's access was revoked or expired. Replies are not delivered until someone reconnects it from the platform; its conversations and settings are kept. Fields: `disconnected`.
- **max_inboxes**: How many Instagram accounts the project may connect. Contact support to raise it. Fields: `max_inboxes`.

## Connecting accounts

Accounts are connected and reconnected in the platform, because the account owner has to sign in with Instagram in their browser. There is no API for connecting an account.

## Authorization

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

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "inboxes": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "created_at": "2026-01-15T12:00:00.000Z",
      "username": "string",
      "avatar_url": "string",
      "disconnected": false,
      "agent_id": "00000000-0000-4000-8000-000000000000",
      "agent_name": "string"
    }
  ],
  "max_inboxes": 0
}
```

## Request examples

### cURL

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

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/omni_v2/instagram/inboxes"
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/omni_v2/instagram/inboxes", {
  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/omni_v2/instagram/inboxes", 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))
}
```
