> 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.

# Hämta alla batchanrop för en arbetsyta.

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

Hämta alla batchsamtal för aktuellt workspace.

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) — Filtrera batchanrop till en enda agent.

## Response

### 200

Lyckat svar

- `batch_calls` (list of BatchCallResponse, required)
- `next_doc` (string, optional, nullable) — Nästa dokument, som används för att paginera genom batchanropen
- `has_more` (boolean, optional, default: false) — Om det finns fler batchanrop att paginera igenom

## Errors

### 422 Unprocessable Entity Error

Valideringsfel

- `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) — Maximalt antal samtidiga samtal för detta parti. När värdet anges styrs fördelningen av denna gräns i stället för arbetsytans eller agentens kapacitetsprocent.
- `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) — Hur länge mottagaren ska ringas innan försöket avbryts, i sekunder. Observera att detta även begränsas av leverantörens egna begränsningar.
- `twilio_call_recording_enabled` (boolean, optional, default: false) — Om samtalet ska spelas in med Twilios samtalsinspelning. Ignoreras för leverantörer som inte är Twilio. Inspelningar lagras på ditt Twilio-konto.
- `twilio_machine_detection` (TwilioMachineDetectionConfig, optional, nullable) — Konfiguration för Twilios operatörsnivåbaserade detektering av telefonsvarare (AMD). Utelämna eller ange null för att inaktivera den. Ignoreras för leverantörer som inte är Twilio och för inkommande samtal. Resultatet levereras som en egen webhook-händelse, `answering_machine_detection`, vilket kräver att händelsen är aktiverad i inställningarna för workspace- eller agentwebhookar; den ingår inte i samtalet eller webhooken efter samtalet. Detekteringen körs asynkront och fördröjer därför aldrig starten av samtalet, och resultatet kan komma när som helst under samtalet – med `detect_message_end`, även efter att det har avslutats. Twilio fakturerar AMD separat.

### ValidationErrorLocItems

### TwilioMachineDetectionConfig

Hur Twilios operatörsnivåidentifiering av telefonsvarare (AMD) ska köras i ett samtal.

- `mode` (enum, optional, default: enable) — Hur noggrann identifieringen ska vara. `enable` returnerar ett besked så snart Twilio kan skilja en människa från en maskin. `detect_message_end` väntar också tills röstmeddelandets hälsning är klar, vilket ger beskeden `machine_end_*`, men returnerar ett resultat senare.
  - 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()
```