> 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/knowledge-base

उपलब्ध नॉलेज बेस दस्तावेज़ों की सूची प्राप्त करें

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

- `page_size` (integer, optional, default: 30) — ज़्यादा से ज़्यादा कितने दस्तावेज़ लौटाने हैं। 100 से ज़्यादा नहीं हो सकते, डिफ़ॉल्ट 30 है।
- `search` (string, optional, nullable) — निर्दिष्ट होने पर, endpoint केवल वे नॉलेज बेस दस्तावेज़ लौटाता है जिनके नाम इस स्ट्रिंग से शुरू होते हैं।
- `show_only_owned_documents` (boolean, optional, default: false, deprecated) — true पर सेट होने पर, endpoint केवल आपके स्वामित्व वाले दस्तावेज़ लौटाएगा (किसी और द्वारा शेयर किए गए नहीं)। अप्रचलित: इसके बजाय created_by_user_id इस्तेमाल करें।
- `created_by_user_id` (string, optional, nullable) — क्रिएटर यूज़र ID के अनुसार दस्तावेज़ फ़िल्टर करें। सेट होने पर सिर्फ़ इस यूज़र के बनाए दस्तावेज़ लौटाए जाते हैं। यह show_only_owned_documents पर प्राथमिकता रखता है। प्रमाणित यूज़र के लिए '@me' इस्तेमाल करें।
- `types` (list of enum, optional, nullable) — मौजूद होने पर, endpoint केवल दिए गए प्रकारों के दस्तावेज़ लौटाएगा।
  - Allowed values: `file`, `url`, `text`, `folder`
- `parent_folder_id` (string, optional, nullable) — सेट होने पर, endpoint केवल दिए गए फ़ोल्डर के सीधे अंदर मौजूद दस्तावेज़ लौटाएगा।
- `ancestor_folder_id` (string, optional, nullable) — सेट होने पर, endpoint केवल दिए गए फ़ोल्डर के अंतर्गत आने वाले दस्तावेज़ लौटाएगा।
- `folders_first` (boolean, optional, default: false) — क्या दस्तावेज़ों की सूची में folders पहले लौटाए जाने चाहिए।
- `sort_direction` (enum, optional) — नतीजों को सॉर्ट करने की दिशा
  - Allowed values: `asc`, `desc`
- `sort_by` (enum, optional, nullable) — नतीजों को सॉर्ट करने के लिए फ़ील्ड
  - Allowed values: `name`, `created_at`, `updated_at`, `size`
- `cursor` (string, optional, nullable) — अगला पेज फ़ेच करने के लिए इस्तेमाल होता है। रिस्पॉन्स में cursor लौटाया जाता है।

## Response

### 200

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

- `documents` (list of GetKnowledgeBaseListResponseModelDocumentsItems, required)
- `has_more` (boolean, required)
- `next_cursor` (string, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### GetKnowledgeBaseListResponseModelDocumentsItems

- `type`: `file` (GetKnowledgeBaseSummaryFileResponseModel)
  - `access_info` (ResourceAccessInfo, required)
  - `id` (string, required)
  - `metadata` (KnowledgeBaseDocumentMetadataResponseModel, required)
  - `name` (string, required)
  - `supported_usages` (list of enum, required)
    - Allowed values: `prompt`, `auto`
  - `dependent_agents` (list of V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingFileDependentAgentsItems, required, deprecated) — यह फ़ील्ड डिप्रिकेटेड है और भविष्य में हटा दी जाएगी। इसकी जगह डिपेंडेंट एजेंट पाने के लिए अलग एंडपॉइंट इस्तेमाल करें।
  - `auto_sync_info` (AutoSyncInfo, optional, nullable)
  - `external_sync_info` (ExternalFileSyncInfo, optional, nullable) — किसी बाहरी स्रोत में मूल फ़ाइल के लिंक को ट्रैक करता है।
  - `folder_parent_id` (string, optional, nullable) — पैरेंट फ़ोल्डर की ID, या दस्तावेज़ रूट स्तर पर होने पर null।
  - `folder_path` (list of KnowledgeBaseFolderPathSegmentSummaryResponseModel, optional) — रूट से पैरेंट फ़ोल्डर तक, इस एंटिटी तक ले जाने वाले फ़ोल्डर पाथ सेगमेंट।
  - `is_frozen` (boolean, optional, default: false)
  - `refresh_status` (FileRefreshStatus, optional, nullable) — बाहरी रूप से सिंक की गई KB फ़ाइल के लिए प्रगति पर/अंतिम refresh की स्थिति।
- `type`: `folder` (GetKnowledgeBaseSummaryFolderResponseModel)
  - `access_info` (ResourceAccessInfo, required)
  - `children_count` (integer, required)
  - `document_count` (integer, required) — इस folder के subtree में कहीं भी मौजूद non-folder documents की संख्या (recursive)। गिनती 1000 के बाद रुक जाती है;
  - `id` (string, required)
  - `metadata` (KnowledgeBaseDocumentMetadataResponseModel, required)
  - `name` (string, required)
  - `supported_usages` (list of enum, required)
    - Allowed values: `prompt`, `auto`
  - `dependent_agents` (list of V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingFolderDependentAgentsItems, required, deprecated) — यह फ़ील्ड डिप्रिकेटेड है और भविष्य में हटा दी जाएगी। इसकी जगह डिपेंडेंट एजेंट पाने के लिए अलग एंडपॉइंट इस्तेमाल करें।
  - `auto_sync_info` (AutoSyncInfo, optional, nullable)
  - `external_sync_info` (ExternalFolderSyncInfo, optional, nullable) — किसी बाहरी सोर्स फ़ोल्डर को मिरर करने वाले KB फ़ोल्डर का मेटाडेटा।
  - `folder_parent_id` (string, optional, nullable) — पैरेंट फ़ोल्डर की ID, या दस्तावेज़ रूट स्तर पर होने पर null।
  - `folder_path` (list of KnowledgeBaseFolderPathSegmentSummaryResponseModel, optional) — रूट से पैरेंट फ़ोल्डर तक, इस एंटिटी तक ले जाने वाले फ़ोल्डर पाथ सेगमेंट।
  - `is_frozen` (boolean, optional, default: false)
- `type`: `text` (GetKnowledgeBaseSummaryTextResponseModel)
  - `access_info` (ResourceAccessInfo, required)
  - `id` (string, required)
  - `metadata` (KnowledgeBaseDocumentMetadataResponseModel, required)
  - `name` (string, required)
  - `supported_usages` (list of enum, required)
    - Allowed values: `prompt`, `auto`
  - `dependent_agents` (list of V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingTextDependentAgentsItems, required, deprecated) — यह फ़ील्ड डिप्रिकेटेड है और भविष्य में हटा दी जाएगी। इसकी जगह डिपेंडेंट एजेंट पाने के लिए अलग एंडपॉइंट इस्तेमाल करें।
  - `folder_parent_id` (string, optional, nullable) — पैरेंट फ़ोल्डर की ID, या दस्तावेज़ रूट स्तर पर होने पर null।
  - `folder_path` (list of KnowledgeBaseFolderPathSegmentSummaryResponseModel, optional) — रूट से पैरेंट फ़ोल्डर तक, इस एंटिटी तक ले जाने वाले फ़ोल्डर पाथ सेगमेंट।
- `type`: `url` (GetKnowledgeBaseSummaryURLResponseModel)
  - `access_info` (ResourceAccessInfo, required)
  - `id` (string, required)
  - `metadata` (KnowledgeBaseDocumentMetadataResponseModel, required)
  - `name` (string, required)
  - `supported_usages` (list of enum, required)
    - Allowed values: `prompt`, `auto`
  - `url` (string, required)
  - `dependent_agents` (list of V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingUrlDependentAgentsItems, required, deprecated) — यह फ़ील्ड डिप्रिकेटेड है और भविष्य में हटा दी जाएगी। इसकी जगह डिपेंडेंट एजेंट पाने के लिए अलग एंडपॉइंट इस्तेमाल करें।
  - `auto_sync_info` (AutoSyncInfo, optional, nullable)
  - `folder_parent_id` (string, optional, nullable) — पैरेंट फ़ोल्डर की ID, या दस्तावेज़ रूट स्तर पर होने पर null।
  - `folder_path` (list of KnowledgeBaseFolderPathSegmentSummaryResponseModel, optional) — रूट से पैरेंट फ़ोल्डर तक, इस एंटिटी तक ले जाने वाले फ़ोल्डर पाथ सेगमेंट।

### ValidationError

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

### ResourceAccessInfo

- `is_creator` (boolean, required) — क्या अनुरोध करने वाला यूज़र एजेंट का निर्माता है
- `creator_name` (string, required) — एजेंट के निर्माता का नाम
- `creator_email` (string, required) — एजेंट के निर्माता का ईमेल
- `role` (enum, required) — रिक्वेस्ट करने वाले यूज़र की भूमिका
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — अनाम यूज़र्स के लिए एक्सेस लेवल। यदि None है, तो रिसोर्स सार्वजनिक रूप से शेयर नहीं किया गया है।
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — रिक्वेस्ट करने वाले यूज़र के पास इस रिसोर्स का एक्सेस क्यों है। 'creator' = कॉलर मालिक है। 'explicit' = कॉलर (या उसके किसी वर्कस्पेस ग्रुप) को वर्कस्पेस-व्यापी everyone ग्रुप के अलावा role_to_group_ids में सूचीबद्ध किया गया है। 'workspace_default' = वर्कस्पेस-व्यापी everyone ग्रुप role_to_group_ids में सूचीबद्ध है (एडमिन समेत हर गैर-अनाम वर्कस्पेस सदस्य इस रिसोर्स को देखता है)। 'workspace_admin' = कॉलर वर्कस्पेस एडमिन है और एडमिन सीट ही एक्सेस का *एकमात्र* रास्ता है; यह उन दस्तावेज़ों के लिए आरक्षित है जिन्हें कोई और नहीं देख सकता। इससे UI बता पाता है कि एडमिन-बायपास व्यूअर को वह दस्तावेज़ क्यों दिख रहा है जो उसके साथ स्पष्ट रूप से शेयर नहीं किया गया था।
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### KnowledgeBaseDocumentMetadataResponseModel

- `created_at_unix_secs` (integer, required)
- `last_updated_at_unix_secs` (integer, required)
- `size_bytes` (integer, required)

### V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingFileDependentAgentsItems

- `type`: `available` (DependentAvailableAgentIdentifier)
  - `access_level` (enum, required)
    - Allowed values: `admin`, `editor`, `commenter`, `viewer`
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `name` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।
- `type`: `unknown` (DependentUnknownAgentIdentifier)
  - `id` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।

### AutoSyncInfo

- `minimum_frequency_days` (integer, optional, default: 7) — न्यूनतम आवृत्ति (दिनों में) जिस पर दस्तावेज़ रीफ़्रेश होता है। वास्तविक अंतराल कम हो सकता है, कभी ज़्यादा नहीं।
- `auto_remove` (boolean, optional, default: false) — अगर URL उपलब्ध न रहे, तो दस्तावेज़ हटाना है या नहीं
- `consec_failures` (integer, optional, default: 0) — लगातार sync विफलताओं की संख्या
- `next_refresh_by` (integer, optional, nullable) — अगले निर्धारित सिंक का Unix टाइमस्टैम्प या None (फ़ोल्डरों के मामले में)
- `auto_discover` (boolean, optional, default: false, deprecated) — बहिष्कृत। इस फ़ील्ड का अब कोई प्रभाव नहीं है और इसे भविष्य के रिलीज़ में हटा दिया जाएगा।

### ExternalFileSyncInfo

किसी बाहरी स्रोत में मूल फ़ाइल के लिंक को ट्रैक करता है।

- `type` (enum, required) — प्रोवाइडर आइडेंटिफ़ायर
  - Allowed values: `google_drive`
- `source_entity_id` (string, required) — बाहरी सिस्टम में एंटिटी ID
- `integration_connection_id` (string, required) — इंटीग्रेशन कनेक्शन इंस्टेंस ID
- `source_parent_entity_id` (string, required) — उस बाहरी सिस्टम में फ़ोल्डर ID, जिससे यह फ़ाइल सिंक की गई थी
- `source_mime_type` (string, required) — बाहरी सिस्टम में मूल MIME type
- `source_modified_time` (string, required) — बाहरी सिस्टम से आखिरी बदलाव का समय
- `root_folder_id` (string, optional, nullable) — sync root का KB folder ID, जिसका इस्तेमाल sync tree के अंतर्गत सभी entities को क्वेरी करने के लिए होता है

### KnowledgeBaseFolderPathSegmentSummaryResponseModel

- `id` (string, required)

### FileRefreshStatus

बाहरी रूप से सिंक की गई KB फ़ाइल के लिए प्रगति पर/अंतिम refresh की स्थिति।

- `status` (enum, optional, default: queued)
  - Allowed values: `queued`, `processing`, `succeeded`, `failed`, `skipped`, `cancelled`
- `enqueued_at` (integer, optional, nullable)
- `started_at` (integer, optional, nullable)
- `completed_at` (integer, optional, nullable)
- `last_synced_at` (integer, optional, nullable)
- `error_message` (string, optional, nullable)

### V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingFolderDependentAgentsItems

- `type`: `available` (DependentAvailableAgentIdentifier)
  - `access_level` (enum, required)
    - Allowed values: `admin`, `editor`, `commenter`, `viewer`
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `name` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।
- `type`: `unknown` (DependentUnknownAgentIdentifier)
  - `id` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।

### ExternalFolderSyncInfo

किसी बाहरी सोर्स फ़ोल्डर को मिरर करने वाले KB फ़ोल्डर का मेटाडेटा।

- `type` (enum, required) — प्रोवाइडर आइडेंटिफ़ायर
  - Allowed values: `google_drive`
- `source_entity_id` (string, required) — बाहरी सिस्टम में एंटिटी ID
- `integration_connection_id` (string, required) — इंटीग्रेशन कनेक्शन इंस्टेंस ID
- `root_folder_id` (string, optional, nullable) — sync root का KB folder ID। None का मतलब है कि यह फ़ोल्डर root है।
- `sync_cursor` (string, optional, nullable) — incremental sync के लिए opaque cursor, जिसकी व्याख्या provider करता है
- `last_sync_at` (integer, optional, nullable) — आखिरी पूरे हुए सिंक का Unix टाइमस्टैम्प

### V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingTextDependentAgentsItems

- `type`: `available` (DependentAvailableAgentIdentifier)
  - `access_level` (enum, required)
    - Allowed values: `admin`, `editor`, `commenter`, `viewer`
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `name` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।
- `type`: `unknown` (DependentUnknownAgentIdentifier)
  - `id` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।

### V1ConvaiKnowledgeBaseSummariesGetResponsesContentApplicationJsonSchemaDiscriminatorMappingSuccessDataDiscriminatorMappingUrlDependentAgentsItems

- `type`: `available` (DependentAvailableAgentIdentifier)
  - `access_level` (enum, required)
    - Allowed values: `admin`, `editor`, `commenter`, `viewer`
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `name` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।
- `type`: `unknown` (DependentUnknownAgentIdentifier)
  - `id` (string, required)
  - `referenced_resource_ids` (list of string, optional) — अगर एजेंट एक ट्रांज़िटिव डिपेंडेंट है, तो इसमें उन संसाधनों के IDs होते हैं जिन पर एजेंट सीधे निर्भर करता है।

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "documents": [
    {
      "access_info": {
        "access_source": "creator",
        "creator_email": "john.doe@example.com",
        "creator_name": "John Doe",
        "is_creator": true,
        "role": "admin"
      },
      "auto_sync_info": {
        "auto_discover": false,
        "auto_remove": false,
        "consec_failures": 0,
        "minimum_frequency_days": 7,
        "next_refresh_by": 1
      },
      "dependent_agents": [
        {
          "access_level": "admin",
          "created_at_unix_secs": 1,
          "id": "string",
          "name": "string",
          "referenced_resource_ids": [
            "string"
          ],
          "type": "available"
        }
      ],
      "folder_parent_id": "string",
      "folder_path": [
        {
          "id": "string"
        }
      ],
      "id": "string",
      "metadata": {
        "created_at_unix_secs": 1,
        "last_updated_at_unix_secs": 1,
        "size_bytes": 1
      },
      "name": "string",
      "supported_usages": [
        "auto"
      ],
      "type": "string",
      "url": "string"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/knowledge-base"

response = requests.get(url)

print(response.json())
```

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

	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/knowledge-base")

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/knowledge-base")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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