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

# List Conversations

## List Conversations

Retrieve a list of conversations for agents belonging to the authenticated user.

<ParamField path="query" name="agent_id" type="string" optional>
  Filter conversations by agent ID
</ParamField>

<ParamField path="query" name="page_size" type="integer" optional default="30">
  Number of conversations to return per page (1-100)
</ParamField>

<ParamField path="query" name="call_successful" type="string" optional>
  Filter by call success status: 'success' or 'failure'
</ParamField>

<ParamField path="query" name="call_start_before_unix" type="integer" optional>
  Filter conversations started before this Unix timestamp
</ParamField>

<ParamField path="query" name="call_start_after_unix" type="integer" optional>
  Filter conversations started after this Unix timestamp
</ParamField>

<ParamField path="query" name="user_id" type="string" optional>
  Filter by user ID
</ParamField>

<ParamField path="query" name="summary_mode" type="string" optional default="include">
  Include summary in response: 'include' or 'exclude'
</ParamField>

<ParamField path="query" name="cursor" type="string" optional>
  Pagination cursor for next page
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.example.com/api/v1/conversations?agent_id=123&page_size=20&call_successful=success" \
    -H "X-API-Key: your-api-key-here"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    agent_id: '123',
    page_size: '20',
    call_successful: 'success'
  });

  const response = await fetch(`https://api.example.com/api/v1/conversations?${params}`, {
    method: 'GET',
    headers: {
      'X-API-Key': 'your-api-key-here'
    }
  });

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

  ```python Python theme={null}
  import requests

  headers = {
      'X-API-Key': 'your-api-key-here'
  }

  params = {
      'agent_id': '123',
      'page_size': 20,
      'call_successful': 'success'
  }

  response = requests.get(
      'https://api.example.com/api/v1/conversations',
      headers=headers,
      params=params
  )

  data = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="status" type="object">
  Response status information

  <ResponseField name="code" type="integer">
    HTTP status code (200)
  </ResponseField>

  <ResponseField name="message" type="string">
    Status message
  </ResponseField>
</ResponseField>

<ResponseField name="data" type="array">
  Array of conversation objects

  <ResponseField name="conversation_id" type="string">
    Unique conversation identifier
  </ResponseField>

  <ResponseField name="agent_id" type="string">
    Associated agent ID
  </ResponseField>

  <ResponseField name="agent_name" type="string">
    Name of the agent
  </ResponseField>

  <ResponseField name="status" type="string">
    Conversation status
  </ResponseField>

  <ResponseField name="transcript" type="array">
    Array of conversation transcript entries
  </ResponseField>

  <ResponseField name="metadata" type="object">
    Additional conversation metadata
  </ResponseField>

  <ResponseField name="created_at" type="string">
    ISO 8601 timestamp when conversation started
  </ResponseField>
</ResponseField>

<ResponseField name="total_count" type="integer">
  Total number of conversations matching the query
</ResponseField>

<ResponseField name="cursor" type="string" nullable>
  Pagination cursor for the next page
</ResponseField>

<ResponseField name="has_more" type="boolean">
  Whether there are more results available
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": {
      "code": 200,
      "message": "Success"
    },
    "data": [
      {
        "conversation_id": "conv_abc123",
        "agent_id": "123",
        "agent_name": "Customer Support Agent",
        "status": "completed",
        "transcript": [
          {
            "role": "user",
            "content": "Hello, I need help with my order",
            "timestamp": "2024-01-15T10:30:00Z"
          },
          {
            "role": "assistant",
            "content": "I'd be happy to help you with your order. Can you provide your order number?",
            "timestamp": "2024-01-15T10:30:05Z"
          }
        ],
        "metadata": {
          "duration": 120,
          "call_quality": "good"
        },
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "total_count": 1,
    "cursor": "eyJpZCI6IjEyMyJ9",
    "has_more": false
  }
  ```
</ResponseExample>

## Pagination

Use the `cursor` field from the response to fetch the next page:

```bash theme={null}
curl -X GET "https://api.example.com/api/v1/conversations?cursor=eyJpZCI6IjEyMyJ9" \
  -H "X-API-Key: your-api-key-here"
```

## Error Responses

<ResponseField name="401" type="object">
  Unauthorized - Invalid or missing authentication
</ResponseField>

<ResponseField name="400" type="object">
  Bad request - Missing API key or invalid parameters
</ResponseField>

<ResponseField name="502" type="object">
  Bad gateway - ElevenLabs API error
</ResponseField>
