> 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 Knowledge Source

GET https://api.elevenlabs.io/v1/reception/knowledge-sources/{source_id}

Get a specific knowledge source by ID

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

## Request

### Path parameters

- `source_id` (string, required)

### Headers

- `xi-workspace-id` (string, optional, nullable) — The customer workspace a reseller's API key acts on.

## Response

### 200

Pomyślna odpowiedź

- `_id` (string, required)
- `source_type` (enum, optional, default: file) — Type of knowledge source.
  - Allowed values: `file`, `url`
- `source_url` (string, optional, nullable)
- `last_scraped_at_unix` (integer, optional, nullable)
- `original_filename` (string, optional, default: )
- `content_type` (string, optional, default: )
- `file_size_bytes` (integer, optional, default: 0)
- `status` (enum, optional, default: processing) — Processing status for knowledge sources. - `processing`: the file or site is being read. - `ready`: done; the results are available. - `error`: it failed and can be retried. See `progress` for detail.
  - Allowed values: `processing`, `ready`, `error`
- `error_message` (string, optional, nullable)
- `failure_reason` (enum, optional, nullable) — Why processing a knowledge source failed.
  - Allowed values: `blocked_url`, `dns_failure`, `host_unreachable`, `access_refused`, `crawl_timeout`, `no_pages`, `no_content`, `upstream_timeout`, `upstream_error`, `unknown`
- `crawl_entire_site` (boolean, optional, default: false)
- `scraped_pages_count` (integer, optional, default: 0)
- `content_preview` (string, optional, nullable)
- `processing_started_at_unix` (integer, optional, nullable)
- `created_at_unix` (integer, optional) — Unix timestamp (seconds since epoch)
- `updated_at_unix` (integer, optional) — Unix timestamp (seconds since epoch)

## Errors

### 422 Unprocessable Entity Error

Błąd walidacji

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

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

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "_id": "string",
  "source_type": "file",
  "source_url": "string",
  "last_scraped_at_unix": 1,
  "original_filename": "",
  "content_type": "",
  "file_size_bytes": 0,
  "status": "processing",
  "error_message": "string",
  "failure_reason": "blocked_url",
  "crawl_entire_site": false,
  "scraped_pages_count": 0,
  "content_preview": "string",
  "processing_started_at_unix": 1,
  "created_at_unix": 1,
  "updated_at_unix": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/reception/knowledge-sources/source_id"

response = requests.get(url)

print(response.json())
```

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

	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/reception/knowledge-sources/source_id")

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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