> This is a page from the ElevenLabs documentation. For an index of the documentation, fetch https://elevenlabs.io/docs/llms.txt.

# Listar tickets de conversa do agente

GET https://api.elevenlabs.io/v1/convai/agents/{agent_id}/triage-tickets

Lista os problemas de um agente, com os criados mais recentemente primeiro, a menos que sejam ordenados por prioridade. São problemas sobre o desempenho do próprio agente em uma conversa (para trabalhar com o Architect), não tickets que um agente abre para usuários finais.

Reference: https://elevenlabs.io/docs/api-reference/issues/list

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `agent_id` (string, required)

### Query parameters

- `page_size` (integer, optional, default: 100) — Quantos problemas do agente retornar. Não pode exceder 100.
- `conversation_id` (string, optional, nullable) — Filtre problemas do agente por ID da conversa.
- `status` (enum, optional, nullable) — Filtre problemas do agente por status.
  - Allowed values: `open`, `in_progress`, `resolved`, `cancelled`, `merged`
- `sources` (list of enum, optional, nullable) — Filtre problemas do agente pela forma como foram reportados (qa, agent, manual). Repita o parâmetro para filtrar por várias origens.
  - Allowed values: `qa`, `agent`, `manual`
- `priorities` (list of enum, optional, nullable) — Filtre problemas do agente por prioridade. Repita o parâmetro para filtrar por várias prioridades.
  - Allowed values: `low`, `medium`, `high`, `urgent`
- `sort_by` (enum, optional) — Ordene pelos itens criados mais recentemente, por prioridade (os mais urgentes primeiro e, em seguida, os criados mais recentemente), pelos reportados mais recentemente (o relatório mais recente incorporado ao problema do agente ou, caso não haja, a criação dele) ou pela quantidade de relatórios (os problemas do agente com mais relatórios incorporados primeiro e, em seguida, os criados mais recentemente).
  - Allowed values: `created_at`, `priority`, `last_reported`
- `owner_user_id` (string, optional, nullable) — Filtre problemas do agente por criador. Use 'agent' para problemas reportados pelo agente.
- `assignee_user_id` (string, optional, nullable) — Filtre problemas do agente por responsável. Use 'unassigned' para problemas sem responsável.
- `label` (string, optional, nullable) — Filtre problemas do agente por um rótulo exato.
- `merged_into_ticket_id` (string, optional, nullable) — Filtre problemas do agente mesclados neste problema.
- `search` (string, optional, nullable) — Case-insensitive free-text search across the agent issue's title, description, comments, and turn comments.
- `cursor` (string, optional, nullable) — Usado para buscar a próxima página. O cursor é retornado na resposta.

## Response

### 200

Resposta bem-sucedida

- `agent_conversation_tickets` (list of AgentConversationTicketResponseModel, required)
- `has_more` (boolean, required)
- `next_cursor` (string, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

Erro de validação

- `detail` (list of ValidationError, optional)

## Types

### AgentConversationTicketResponseModel

- `agentqa_ticket_id` (string, required)
- `workspace_id` (string, required)
- `owner_user_id` (string, required)
- `agent_id` (string, required)
- `needs_clustering` (boolean, required)
- `title` (string, required, nullable) — Título de uma linha para o problema do agente. None somente em problemas criados antes de os títulos existirem.
- `labels` (list of string, required)
- `conversation_ids` (list of string, required)
- `first_seen_unix_secs` (integer, required, nullable)
- `last_seen_unix_secs` (integer, required, nullable)
- `qa_comment` (string, required, nullable)
- `ticket_comments` (list of TicketCommentResponseModel, required)
- `turn_comments` (list of TurnCommentResponseModel, required)
- `status` (enum, required)
  - Allowed values: `open`, `in_progress`, `resolved`, `cancelled`, `merged`
- `priority` (enum, required, nullable)
  - Allowed values: `low`, `medium`, `high`, `urgent`
- `priority_changes` (list of TicketPriorityChangeResponseModel, required)
- `status_changes` (list of TicketStatusChangeResponseModel, required)
- `source` (enum, required)
  - Allowed values: `qa`, `agent`, `manual`
- `assignee_user_id` (string, required, nullable)
- `created_at_unix_secs` (integer, required)
- `updated_at_unix_secs` (integer, required)
- `merged_into_ticket_id` (string, optional, nullable) — O problema de agente ao qual este foi mesclado, definido enquanto seu status é 'merged'.
- `search_match` (TicketSearchMatchResponseModel, optional, nullable) — Onde a consulta `search` da lista encontrou correspondência. Definido apenas em listas pesquisadas.
- `issue_type` (any, optional, deprecated) — Always null. Issue types are labels, written as `issue_type:<value>`.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### TicketCommentResponseModel

- `comment` (string, required)
- `created_at_unix_secs` (integer, required)
- `owner_user_id` (string, required, nullable)

### TurnCommentResponseModel

- `turn_index` (integer, required)
- `comment` (string, required)
- `created_at_unix_secs` (integer, required)
- `owner_user_id` (string, required, nullable)

### TicketPriorityChangeResponseModel

- `priority` (enum, required, nullable)
  - Allowed values: `low`, `medium`, `high`, `urgent`
- `changed_by_user_id` (string, required)
- `changed_at_unix_secs` (integer, required)

### TicketStatusChangeResponseModel

- `status` (enum, required)
  - Allowed values: `open`, `in_progress`, `resolved`, `cancelled`, `merged`
- `changed_by_user_id` (string, required, nullable)
- `changed_at_unix_secs` (integer, required)

### TicketSearchMatchResponseModel

- `field` (enum, required) — Qual dos textos do problema do agente correspondeu.
  - Allowed values: `title`, `description`, `comment`, `turn_comment`
- `snippet` (string, required) — Trecho ao redor da correspondência, com espaços em branco reduzidos e reticências onde foi cortado.
- `highlight_start` (integer, required) — Deslocamento da correspondência em `snippet`.
- `highlight_end` (integer, required) — Deslocamento exclusivo do fim da correspondência em `snippet`.
- `turn_index` (integer, optional, nullable) — O turno comentado, definido quando `field` é 'turn_comment'.

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "agent_conversation_tickets": [
    {
      "agentqa_ticket_id": "string",
      "workspace_id": "string",
      "owner_user_id": "string",
      "agent_id": "string",
      "needs_clustering": true,
      "title": "string",
      "labels": [
        "string"
      ],
      "conversation_ids": [
        "string"
      ],
      "first_seen_unix_secs": 1,
      "last_seen_unix_secs": 1,
      "qa_comment": "string",
      "ticket_comments": [
        {
          "comment": "string",
          "created_at_unix_secs": 1,
          "owner_user_id": "string"
        }
      ],
      "turn_comments": [
        {
          "turn_index": 1,
          "comment": "string",
          "created_at_unix_secs": 1,
          "owner_user_id": "string"
        }
      ],
      "status": "open",
      "priority": "low",
      "priority_changes": [
        {
          "priority": "low",
          "changed_by_user_id": "string",
          "changed_at_unix_secs": 1
        }
      ],
      "status_changes": [
        {
          "status": "open",
          "changed_by_user_id": "string",
          "changed_at_unix_secs": 1
        }
      ],
      "source": "qa",
      "assignee_user_id": "string",
      "created_at_unix_secs": 1,
      "updated_at_unix_secs": 1,
      "merged_into_ticket_id": "string",
      "search_match": {
        "field": "title",
        "snippet": "string",
        "highlight_start": 1,
        "highlight_end": 1,
        "turn_index": 1
      },
      "issue_type": null
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agents/agent_id/triage-tickets")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```