# List conversations for a contact

> GET https://api.nabrah.ai/api/ext/omni_v2/contact/{contact_id}/conversations

Group: Contacts. Page: https://www.nabrah.ai/en/docs/api-reference/contacts/list-conversations-for-a-contact

Lists all conversations that belong to the contact identified by `contact_id`. The response `payload` is an array of conversation objects, each including its `id`, `uuid`, `status`, `inbox_id`, channel metadata under `meta`, the contact (`sender`), and the conversation `messages`. Use this to pull a contact's full cross-channel conversation history. Obtain `contact_id` from the list or search contact endpoints.

## Authentication

- **X-API-Key header**: Send your Web API key (prefix `nb_`) in the `X-API-Key` header. The key is scoped to one project; the contact must belong to that project.

## Response shape

- **Conversation objects**: Each item in `payload` represents one conversation. Useful top-level fields include `id`, `uuid`, `status`, `inbox_id`, `unread_count`, `last_activity_at`, `priority`, and `labels`. The `meta` object identifies the `channel` and the `sender` (the contact), and `messages` holds the conversation's messages with content, sender, and timestamps. Fields: `id`, `uuid`, `status`, `inbox_id`, `meta.channel`, `messages`, `last_activity_at`.

## Authorization

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

## Path parameters

- `contact_id` (integer, required): Numeric identifier of the contact whose conversations are listed. Obtained from `GET /api/ext/omni_v2/contact` or `GET /api/ext/omni_v2/contact/search` (the contact `id` field).

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "payload": [
    {
      "meta": {
        "sender": {
          "id": 0,
          "additional_attributes": null,
          "availability_status": "string",
          "email": "string",
          "name": "string",
          "phone_number": "string",
          "blocked": false,
          "identifier": "string",
          "thumbnail": "string",
          "custom_attributes": {},
          "last_activity_at": 0,
          "created_at": 0
        },
        "channel": "string",
        "hmac_verified": false
      },
      "id": 0,
      "messages": [
        {
          "id": 0,
          "content": "string",
          "account_id": 0,
          "inbox_id": 0,
          "conversation_id": 0,
          "message_type": 0,
          "created_at": 0,
          "updated_at": "string",
          "private": false,
          "status": "string",
          "content_type": "string",
          "sender_type": "string",
          "sender_id": 0,
          "processed_message_content": "string",
          "conversation": {
            "unread_count": 0,
            "last_activity_at": 0,
            "contact_inbox": null,
            "assignee_id": null
          },
          "sender": {
            "additional_attributes": null,
            "id": null,
            "name": null,
            "phone_number": null,
            "blocked": null,
            "type": null,
            "custom_attributes": null,
            "email": null,
            "identifier": null,
            "thumbnail": null
          },
          "source_id": "string",
          "content_attributes": {},
          "external_source_ids": {},
          "additional_attributes": {},
          "sentiment": {}
        }
      ],
      "account_id": 0,
      "uuid": "string",
      "agent_last_seen_at": 0,
      "assignee_last_seen_at": 0,
      "can_reply": false,
      "contact_last_seen_at": 0,
      "inbox_id": 0,
      "muted": false,
      "status": "string",
      "created_at": 0,
      "updated_at": 0,
      "timestamp": 0,
      "first_reply_created_at": 0,
      "unread_count": 0,
      "last_activity_at": 0,
      "waiting_since": 0,
      "additional_attributes": {},
      "custom_attributes": {},
      "labels": [
        "string"
      ],
      "snoozed_until": "string",
      "last_non_activity_message": {
        "id": 0,
        "content": "string",
        "account_id": 0,
        "inbox_id": 0,
        "conversation_id": 0,
        "message_type": 0,
        "created_at": 0,
        "updated_at": "string",
        "private": false,
        "status": "string",
        "content_type": "string",
        "sender_type": "string",
        "sender_id": 0,
        "processed_message_content": "string",
        "conversation": {
          "unread_count": 0,
          "last_activity_at": 0,
          "contact_inbox": null,
          "assignee_id": null
        },
        "sender": {
          "additional_attributes": null,
          "id": null,
          "name": null,
          "phone_number": null,
          "blocked": null,
          "type": null,
          "custom_attributes": null,
          "email": null,
          "identifier": null,
          "thumbnail": null
        },
        "source_id": "string",
        "content_attributes": {},
        "external_source_ids": {},
        "additional_attributes": {},
        "sentiment": {}
      },
      "priority": "string",
      "sla_policy_id": 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/contact/<contact_id>/conversations' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

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