> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trynavi.guide/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversations API

> API endpoints for managing and retrieving conversation data

## Overview

The Conversations API provides endpoints for managing and retrieving conversation data from AI agents.

## Authentication

All conversation endpoints require authentication using a Bearer token:

```http theme={null}
Authorization: Bearer nav_org_[your_api_key]
```

## Get Conversations

Retrieve a paginated list of conversations for an organization.

### Endpoint

```http theme={null}
GET /api/v1/conversations
```

### Query Parameters

| Parameter         | Type    | Required | Default | Description                                         |
| ----------------- | ------- | -------- | ------- | --------------------------------------------------- |
| `page`            | number  | No       | 1       | Page number for pagination                          |
| `limit`           | number  | No       | 20      | Number of items per page (max: 100)                 |
| `search`          | string  | No       | -       | Search term to filter conversations                 |
| `agent_config_id` | string  | No       | -       | Filter by specific agent configuration ID           |
| `start_date`      | string  | No       | -       | Filter conversations created on or after this date  |
| `end_date`        | string  | No       | -       | Filter conversations created on or before this date |
| `product_id`      | string  | No       | -       | Filter by specific product ID                       |
| `include_admin`   | boolean | No       | false   | Include admin conversations in results              |

### Response Structure

The response includes a list of conversations with pagination metadata:

* **conversations**: Array of conversation objects containing:
  * id, summary, duration\_seconds, agent\_name, agent\_config\_id
  * created\_at, status, end\_user\_email, end\_user\_identifier
  * provider\_conversation\_id, processing\_type, type
  * rating, feedback, isAdmin

* **pagination**: Object containing:
  * page, limit, total, hasMore

### Example Request

```bash theme={null}
curl --location 'https://api.trynavi.guide/api/v1/conversations?page=1&limit=20&product_id=8476ac68-b776-4859-a116-ea9cb2cf7e23&include_admin=false' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer nav_org_f6bd1e2abb5a4c9ac6fd8883e67a41fe85fafa3b261f943a28a35dabf7c74eb6'
```

## Get Conversation by ID

Retrieve detailed information about a specific conversation.

### Endpoint

```http theme={null}
GET /api/v1/conversations/:id
```

### Path Parameters

| Parameter | Type   | Required | Description         |
| --------- | ------ | -------- | ------------------- |
| `id`      | string | Yes      | The conversation ID |

### Response Structure

The response includes detailed conversation information:

* **Conversation fields**: id, audio\_url, agent\_config\_id, end\_user\_id
* **Analysis data**: provider\_conversation\_id, analysis object, conversation\_duration\_secs
* **Status fields**: status, processing\_type, type
* **Timestamps**: created\_at, updated\_at
* **Feedback**: rating, feedback, isAdmin
* **Related data**: agent\_config (id, name, description), end\_user (id, email, identifier)

### Example Request

```bash theme={null}
curl --location 'https://api.trynavi.guide/api/v1/conversations/ac2b3e1c-deda-4d72-a9b7-0174356b8803' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer nav_org_f6bd1e2abb5a4c9ac6fd8883e67a41fe85fafa3b261f943a28a35dabf7c74eb6'
```

## Date Filtering

The start\_date and end\_date parameters filter conversations based on their created\_at timestamp:

* **start\_date**: Returns conversations created on or after this date
* **end\_date**: Returns conversations created on or before this date

Both parameters accept ISO 8601 formatted date strings.

## Error Responses

| Status Code | Description                               |
| ----------- | ----------------------------------------- |
| `400`       | Bad Request - Missing required parameters |
| `404`       | Not Found - Resource not found            |
| `500`       | Internal Server Error                     |
