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

# आउटबाउंड कैंपेन कॉन्फ़िगरेशन प्राप्त करें

GET https://api.elevenlabs.io/v1/convai/outbound-campaigns/config

वर्कस्पेस का आउटबाउंड अभियान कॉन्फ़िगरेशन प्राप्त करें: वह डिफ़ॉल्ट पॉलिसी जिसे नए अभियान अपनाते हैं और प्रति-एजेंट ओवरराइड।

Reference: https://elevenlabs.io/docs/api-reference/campaigns/config/get

## 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)

## Response

### 200

सफल रिस्पॉन्स

- `version` (integer, required) — हर बदलाव के साथ बढ़ता है; इसे `expected_version` के रूप में भेजें।
- `config` (CampaignConfig-Output, required)

## Errors

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### CampaignConfig-Output

- `policy` (PolicyConfig-Output, optional) — वह नीति जो कैंपेन अपनाते हैं, जब तक वे अपनी नीति सेट न करें।
- `agent_policies` (map from string to AgentPolicyOverride-Output, optional) — एजेंट ID के आधार पर `policy` के ओवरराइड।
- `whatsapp_voice_policy` (AgentPolicyOverride-Output, optional, nullable) — WhatsApp वॉइस अभियानों के लिए ओवरराइड, जो वर्कस्पेस पॉलिसी और एजेंट के ओवरराइड के बीच लागू होते हैं। छोड़े गए सेक्शन WhatsApp वॉइस के अंतर्निहित डिफ़ॉल्ट का पालन करते हैं।

### ValidationError

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

### PolicyConfig-Output

- `timezone` (string, optional, default: UTC) — IANA टाइमज़ोन जिसमें कॉलिंग अवधि पढ़ी जाती है।
- `retry` (RetryPolicy, optional)
- `calling_periods` (list of CallingPeriod, optional) — वे साप्ताहिक समय-सीमाएं जिनमें कॉल की जा सकती हैं।
- `data_collection` (DataCollectionConfig, optional) — एजेंट के डेटा कलेक्शन आइटम, जो फ़ॉलो-अप कॉल को निर्देशित करते हैं। हर आइटम अपने उद्देश्य के लिए अंतर्निहित आइटम पर डिफ़ॉल्ट होता है; `null` इसे बंद कर देता है।
- `followup_context` (FollowupContextPolicy, optional) — फ़ॉलो-अप कॉल्स को कौन से `campaign__` डायनामिक वेरिएबल्स मिलते हैं।

### AgentPolicyOverride-Output

यहां सेट किया गया हर सेक्शन पॉलिसी के पूरे संबंधित सेक्शन को बदल देता है।

- `timezone` (string, optional, nullable)
- `retry` (RetryPolicy, optional, nullable)
- `calling_periods` (list of CallingPeriod, optional, nullable)
- `data_collection` (DataCollectionConfig, optional, nullable) — एजेंट के डेटा कलेक्शन आइटम, जो फ़ॉलो-अप कॉल को निर्देशित करते हैं। हर आइटम अपने उद्देश्य के लिए अंतर्निहित आइटम पर डिफ़ॉल्ट होता है; `null` इसे बंद कर देता है।
- `followup_context` (FollowupContextPolicy, optional, nullable) — फ़ॉलो-अप कॉल्स को कौन से `campaign__` डायनामिक वेरिएबल्स मिलते हैं।

### ValidationErrorLocItems

- string
- integer

### RetryPolicy

- `retry_delay_seconds` (integer, optional, default: 600) — छोटे रीट्राई से पहले कितना इंतज़ार करना है।
- `max_short_retries` (integer, optional, default: 1) — विफल कॉल के बाद किसी कॉलिंग विंडो द्वारा अनुमत रीट्राई। इनके समाप्त होने पर अगला रीट्राई अगली विंडो की प्रतीक्षा करता है, जो नई गिनती के साथ शुरू होती है।
- `max_total_calls` (integer, optional, default: 6) — पहली कॉल सहित, लीड को मिलने वाली अधिकतम कॉल।
- `max_callbacks` (integer, optional, default: 2) — एक नंबर के लिए स्वीकार किए जाने वाले कॉलबैक की अधिकतम संख्या।
- `max_redirects` (integer, optional, default: 2) — लीड द्वारा किसी दूसरे नंबर पर कॉल करने के अनुरोध का अनुसरण करने की अधिकतम संख्या।
- `interval_placement` (enum, optional, default: start) — बाद की कॉलिंग विंडो में टाली गई कॉल कहां होगी: उसके `start` पर, किसी `random` समय पर, या उस विंडो में पिछली कॉल जहां विफल हुई थी उसके `rotate_step_seconds` बाद `rotate` करके।
  - Allowed values: `start`, `random`, `rotate`
- `rotate_step_seconds` (integer, optional, default: 900) — `rotate` प्लेसमेंट हर कॉल को कितनी दूरी तक ले जाता है। केवल `rotate` द्वारा उपयोग किया जाता है।
- `max_consecutive_failures_per_number` (integer, optional, nullable) — किसी एक नंबर पर लगातार विफल हो सकने वाली कॉल की संख्या, जिसके बाद लीड अपने अगले सूचीबद्ध नंबर पर जाती है; यदि कोई अगला नंबर नहीं है, तो प्रक्रिया समाप्त हो जाती है। जवाब दी गई कॉल या नए नंबर पर रीडायरेक्ट होने पर गिनती फिर से शुरू होती है। सेट न होने पर केवल `max_total_calls` लागू रहता है।

### CallingPeriod

- `weekdays` (list of integer, required) — वे दिन जिन पर अंतराल लागू होते हैं, `0` (सोमवार) से `6` (रविवार) तक।
- `intervals` (list of CallingIntervalPolicy, required) — उनमें से हर दिन की समय-सीमाएं। वे किसी भी दिन ओवरलैप नहीं हो सकतीं।

### DataCollectionConfig

एजेंट के डेटा कलेक्शन आइटम, जो फ़ॉलो-अप कॉल को निर्देशित करते हैं। हर आइटम अपने उद्देश्य के लिए अंतर्निहित आइटम पर डिफ़ॉल्ट होता है; `null` इसे बंद कर देता है।

- `callback_time` (string, optional, nullable, default: __system_data_collection_callback_time) — वह आइटम जिसमें संपर्क द्वारा कॉलबैक के लिए मांगा गया समय है।
- `redirect_phone_number` (string, optional, nullable, default: __system_data_collection_redirect_phone_number) — वह आइटम जिसमें संपर्क द्वारा कॉल करने के लिए मांगा गया दूसरा नंबर है।
- `stop` (string, optional, nullable, default: __system_data_collection_do_not_call) — वह आइटम जो संपर्क के दोबारा कॉल न करने के अनुरोध पर true होता है।
- `mappings` (map from string to string, optional) — बाद की कॉल के लिए डेटा कलेक्शन नतीजों को डायनामिक वैरिएबल में कॉपी करता है: हर कुंजी एक डेटा कलेक्शन आइटम ID है और उसका मान वैरिएबल का नाम है।

### FollowupContextPolicy

फ़ॉलो-अप कॉल्स को कौन से `campaign__` डायनामिक वेरिएबल्स मिलते हैं।

- `call_type` (boolean, optional, default: true) — कॉल टाइप को `campaign__call_type` के रूप में पास करें।
- `previous_conversation_id` (boolean, optional, default: true) — पिछली बातचीत की ID को `campaign__previous_conversation_id` के रूप में पास करें।
- `previous_summary` (boolean, optional, default: true) — पिछली बातचीत का सारांश `campaign__previous_summary` के रूप में पास करें।
- `previous_transcript` (boolean, optional, default: true) — पिछली बातचीत का ट्रांसक्रिप्ट `campaign__previous_transcript` के रूप में पास करें।

### CallingIntervalPolicy

- `start` (string, required) — स्थानीय प्रारंभ समय, `HH:MM` के रूप में।
- `end` (string, required) — स्थानीय समाप्ति समय, `HH:MM` के रूप में; `24:00` आधी रात को समाप्त होता है।

## Examples

**Response**

```json
{
  "version": 1,
  "config": {
    "policy": {
      "timezone": "UTC",
      "retry": {
        "retry_delay_seconds": 600,
        "max_short_retries": 1,
        "max_total_calls": 6,
        "max_callbacks": 2,
        "max_redirects": 2,
        "interval_placement": "start",
        "rotate_step_seconds": 900,
        "max_consecutive_failures_per_number": 1
      },
      "calling_periods": [
        {
          "weekdays": [
            1
          ],
          "intervals": [
            {
              "start": "string",
              "end": "string"
            }
          ]
        }
      ],
      "data_collection": {
        "callback_time": "string",
        "redirect_phone_number": "string",
        "stop": "string",
        "mappings": {}
      },
      "followup_context": {
        "call_type": true,
        "previous_conversation_id": true,
        "previous_summary": true,
        "previous_transcript": true
      }
    },
    "agent_policies": {},
    "whatsapp_voice_policy": {
      "timezone": "string",
      "retry": {
        "retry_delay_seconds": 600,
        "max_short_retries": 1,
        "max_total_calls": 6,
        "max_callbacks": 2,
        "max_redirects": 2,
        "interval_placement": "start",
        "rotate_step_seconds": 900,
        "max_consecutive_failures_per_number": 1
      },
      "calling_periods": [
        {
          "weekdays": [
            1
          ],
          "intervals": [
            {
              "start": "string",
              "end": "string"
            }
          ]
        }
      ],
      "data_collection": {
        "callback_time": "string",
        "redirect_phone_number": "string",
        "stop": "string",
        "mappings": {}
      },
      "followup_context": {
        "call_type": true,
        "previous_conversation_id": true,
        "previous_summary": true,
        "previous_transcript": true
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/outbound-campaigns/config"

response = requests.get(url)

print(response.json())
```

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

	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/outbound-campaigns/config")

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/outbound-campaigns/config")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/outbound-campaigns/config');

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

```csharp
using RestSharp;

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