# List conversations

> GET https://api.nabrah.ai/api/ext/omni_v2/conversation/conversation

Group: Conversations. Page: https://www.nabrah.ai/en/docs/api-reference/conversations/list-conversations

Returns a paginated list of conversations (omnichannel inbox threads) for the project that owns the API key. Use the `assignee_type` and `status_param` query filters to scope the inbox view (for example, only open conversations assigned to the current agent), and `q` for free-text search across conversation content and contacts. The `meta` object returns aggregate counts (`all_count`, `mine_count`, `unassigned_count`, `assigned_count`) that power inbox folder badges, while `payload` is the array of conversation summaries. Each conversation `id` returned here is what you pass to the per-conversation endpoints (get, messages, assign, toggle_*, update_last_seen).

## Authentication & scope

Every Omni v2 request is authenticated with your Web API key and scoped to a single project.

- **X-API-Key header**: Send your key in the `X-API-Key` header (it is created in the dashboard under the Developers tab and is prefixed with `nb_`). The key is bound to one project, so there is no `project_id` parameter on any Omni v2 endpoint — the project is inferred from the key. Fields: `X-API-Key`.
- **Validate the key first**: If you are unsure whether a key is valid, call `GET /api/ext/test` once before issuing inbox requests.

Base URL: https://api.nabrah.ai/api

## Pagination

List results are page-based.

- **page**: Pass `page` (1-based) to walk through additional pages of conversations. Combine it with the filters so the page set stays consistent. Page size is fixed by the server.

## Folder counts (meta)

## Authorization

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

## Query parameters

- `assignee_type` (enum(all | me | unassigned | assigned), optional): Filters conversations by who they are assigned to. One of `all`, `me` (assigned to the agent whose key/identity is in context), `unassigned`, or `assigned` (assigned to anyone). Omit to default to the server's standard view.
- `status_param` (enum(open | pending | resolved | snoozed | all), optional): Filters conversations by lifecycle status. One of `open`, `pending`, `resolved`, `snoozed`, or `all`. `snoozed` returns conversations temporarily hidden until their `snoozed_until` timestamp; `all` ignores status filtering.
- `q` (string, optional): Free-text search query. Matches against conversation content and contact details. Leave empty to return the unfiltered (status/assignee-filtered) list.
- `page` (integer, optional): 1-based page number for pagination. Defaults to the first page when omitted. Increment to fetch subsequent pages; page size is server-defined.

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "meta": {
    "all_count": 0,
    "mine_count": 0,
    "unassigned_count": 0,
    "assigned_count": 0
  },
  "payload": [
    {
      "account_id": 0,
      "additional_attributes": {},
      "agent_last_seen_at": 0,
      "assignee_last_seen_at": 0,
      "can_reply": false,
      "contact_last_seen_at": 0,
      "created_at": 0,
      "custom_attributes": {},
      "first_reply_created_at": 0,
      "id": 0,
      "inbox_id": 0,
      "labels": [
        "string"
      ],
      "last_activity_at": 0,
      "last_non_activity_message": {
        "account_id": 0,
        "additional_attributes": {},
        "content": "string",
        "content_attributes": {},
        "content_type": "string",
        "conversation": null,
        "conversation_id": 0,
        "created_at": 0,
        "external_source_ids": {},
        "id": 0,
        "inbox_id": 0,
        "message_type": 0,
        "private": false,
        "processed_message_content": "string",
        "sender": null,
        "sender_id": 0,
        "sender_type": "string",
        "sentiment": {},
        "source_id": "string",
        "status": "string",
        "updated_at": "string",
        "attachments": []
      },
      "messages": [
        {
          "account_id": null,
          "additional_attributes": null,
          "content": null,
          "content_attributes": null,
          "content_type": null,
          "conversation": null,
          "conversation_id": null,
          "created_at": null,
          "external_source_ids": null,
          "id": null,
          "inbox_id": null,
          "message_type": null,
          "private": null,
          "processed_message_content": null,
          "sender": null,
          "sender_id": null,
          "sender_type": null,
          "sentiment": null,
          "source_id": null,
          "status": null,
          "updated_at": null,
          "attachments": null
        }
      ],
      "meta": {
        "channel": "string",
        "hmac_verified": false,
        "sender": null,
        "assignee": null
      },
      "muted": false,
      "priority": "string",
      "sla_policy_id": 0,
      "snoozed_until": 0,
      "status": "string",
      "timestamp": 0,
      "unread_count": 0,
      "updated_at": 0
    }
  ]
}
```

### 422 Validation Error

Content type: `application/json`

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

## Request examples

### cURL

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

### Python

```python
import requests

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