> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# Recupera tutte le chiamate batch di un workspace.

GET https://api.elevenlabs.io/v1/convai/batch-calling/workspace

Ottieni tutte le chiamate batch per il workspace corrente.

Reference: https://elevenlabs.io/docs/api-reference/batch-calling/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

### Query parameters

- `limit` (integer, optional, default: 100)
- `last_doc` (string, optional, nullable)
- `agent_id` (string, optional, nullable) — Filtra le chiamate batch per un singolo agente.

## Response

### 200

Risposta riuscita

- `batch_calls` (list of BatchCallResponse, required)
- `next_doc` (string, optional, nullable) — Il documento successivo, usato per paginare le chiamate batch
- `has_more` (boolean, optional, default: false) — Indica se ci sono altre chiamate batch da visualizzare tramite paginazione

## Errors

### 422 Unprocessable Entity Error

Errore di convalida

- `detail` (list of ValidationError, optional)

## Types

### BatchCallResponse

- `id` (string, required)
- `phone_number_id` (string, required, nullable)
- `phone_provider` (enum, required, nullable)
  - Allowed values: `twilio`, `sip_trunk`, `exotel`
- `whatsapp_params` (BatchCallWhatsAppParams, required, nullable)
- `name` (string, required)
- `agent_id` (string, required)
- `branch_id` (string, required, nullable)
- `environment` (string, required, nullable)
- `created_at_unix` (integer, required)
- `scheduled_time_unix` (integer, required)
- `timezone` (string, required, nullable)
- `total_calls_dispatched` (integer, required, default: 0)
- `total_calls_scheduled` (integer, required, default: 0)
- `total_calls_finished` (integer, required, default: 0)
- `last_updated_at_unix` (integer, required)
- `status` (enum, required)
  - Allowed values: `pending`, `in_progress`, `completed`, `failed`, `cancelled`
- `retry_count` (integer, required, default: 0)
- `telephony_call_config` (TelephonyCallConfig-Output, required)
- `target_concurrency_limit` (integer, required, nullable) — Numero massimo di chiamate simultanee per questo batch. Quando impostato, l'invio è regolato da questo limite anziché dalle percentuali di capacità del workspace o dell'agente.
- `agent_name` (string, required)
- `branch_name` (string, required, nullable)

### ValidationError

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

### BatchCallWhatsAppParams

- `whatsapp_call_permission_request_template_name` (string, required)
- `whatsapp_call_permission_request_template_language_code` (string, required)
- `whatsapp_phone_number_id` (string, optional, nullable)

### TelephonyCallConfig-Output

- `ringing_timeout_secs` (integer, optional, default: 60) — Per quanti secondi far squillare il destinatario prima di interrompere. Tieni presente che sarà limitato anche dai vincoli del provider.
- `twilio_call_recording_enabled` (boolean, optional, default: false) — Indica se registrare la chiamata tramite la registrazione chiamate di Twilio. Ignorato per i provider diversi da Twilio. Le registrazioni vengono archiviate nel tuo account Twilio.
- `twilio_machine_detection` (TwilioMachineDetectionConfig, optional, nullable) — Configurazione per il rilevamento della segreteria telefonica (AMD) a livello di operatore di Twilio. Ometti o imposta su null per disabilitarlo. Viene ignorata per i provider diversi da Twilio e per le chiamate in entrata. Il verdetto risultante viene inviato come evento webhook `answering_machine_detection` separato, che richiede l'abilitazione di tale evento nelle impostazioni webhook del workspace o dell'agente; non fa parte della conversazione né del webhook post-chiamata. Il rilevamento viene eseguito in modo asincrono, quindi non ritarda mai l'inizio della conversazione, e il verdetto può arrivare in qualsiasi momento durante la chiamata -- con `detect_message_end`, anche dopo la sua conclusione. Twilio fattura AMD separatamente.

### ValidationErrorLocItems

### TwilioMachineDetectionConfig

Come eseguire il rilevamento della segreteria telefonica (AMD) a livello di operatore di Twilio durante una chiamata.

- `mode` (enum, optional, default: enable) — Quanto deve essere approfondito il rilevamento. `enable` restituisce un verdetto non appena Twilio riesce a distinguere una persona da una macchina. `detect_message_end` attende anche la fine del messaggio di segreteria telefonica, producendo i verdetti `machine_end_*`, ma restituisce il risultato più tardi.
  - Allowed values: `enable`, `detect_message_end`

## Examples

**Response**

```json
{
  "batch_calls": [
    {
      "id": "string",
      "phone_number_id": "string",
      "phone_provider": "twilio",
      "whatsapp_params": {
        "whatsapp_call_permission_request_template_name": "string",
        "whatsapp_call_permission_request_template_language_code": "string",
        "whatsapp_phone_number_id": "string"
      },
      "name": "string",
      "agent_id": "string",
      "branch_id": "string",
      "environment": "string",
      "created_at_unix": 1,
      "scheduled_time_unix": 1,
      "timezone": "string",
      "total_calls_dispatched": 0,
      "total_calls_scheduled": 0,
      "total_calls_finished": 0,
      "last_updated_at_unix": 1,
      "status": "pending",
      "retry_count": 0,
      "telephony_call_config": {
        "ringing_timeout_secs": 60,
        "twilio_call_recording_enabled": false,
        "twilio_machine_detection": {
          "mode": "enable"
        }
      },
      "target_concurrency_limit": 1,
      "agent_name": "string",
      "branch_name": "string"
    }
  ],
  "next_doc": "string",
  "has_more": false
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/batch-calling/workspace"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/batch-calling/workspace';
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/batch-calling/workspace"

	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/batch-calling/workspace")

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/batch-calling/workspace")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/batch-calling/workspace');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/batch-calling/workspace");
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/batch-calling/workspace")! 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()
```