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

GET https://api.elevenlabs.io/v1/workspace/resources/{resource_id}

Ottiene i metadati di una risorsa in base all'ID.

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

- `resource_id` (string, required) — L'ID della risorsa di destinazione.

### Query parameters

- `resource_type` (enum, required) — Tipo di risorsa della risorsa di destinazione.
  - Allowed values: `voice`, `voice_collection`, `pronunciation_dictionary`, `dubbing`, `dubbing_project`, `project`, `convai_agents`, `convai_knowledge_base_documents`, `convai_tools`, `convai_settings`, `convai_secrets`, `workspace_auth_connections`, `convai_phone_numbers`, `convai_mcp_servers`, `convai_api_integration_connections`, `convai_api_integration_trigger_connections`, `convai_batch_calls`, `convai_agent_response_tests`, `convai_test_suite_invocations`, `convai_crawl_jobs`, `convai_crawl_tasks`, `convai_kb_external_sync_jobs`, `convai_whatsapp_accounts`, `convai_agent_versions`, `convai_agent_branches`, `convai_agent_versions_deployments`, `convai_agent_experiments`, `convai_memory_entries`, `convai_templates`, `dashboard`, `dashboard_configuration`, `convai_agent_drafts`, `resource_locators`, `assets`, `content_generations`, `content_templates`, `content_skills`, `songs`, `transcription_tasks`, `avatars`, `avatar_video_generations`, `resource_collection`, `studio_projects`, `convai_analysis_items`

## Response

### 200

Risposta riuscita

- `resource_id` (string, required) — L'ID della risorsa.
- `resource_name` (string, required, nullable) — Il nome della risorsa, se disponibile.
- `resource_type` (enum, required) — Il tipo della risorsa.
  - Allowed values: `voice`, `voice_collection`, `pronunciation_dictionary`, `dubbing`, `dubbing_project`, `project`, `convai_agents`, `convai_knowledge_base_documents`, `convai_tools`, `convai_settings`, `convai_secrets`, `workspace_auth_connections`, `convai_phone_numbers`, `convai_mcp_servers`, `convai_api_integration_connections`, `convai_api_integration_trigger_connections`, `convai_batch_calls`, `convai_agent_response_tests`, `convai_test_suite_invocations`, `convai_crawl_jobs`, `convai_crawl_tasks`, `convai_kb_external_sync_jobs`, `convai_whatsapp_accounts`, `convai_agent_versions`, `convai_agent_branches`, `convai_agent_versions_deployments`, `convai_agent_experiments`, `convai_memory_entries`, `convai_templates`, `dashboard`, `dashboard_configuration`, `convai_agent_drafts`, `resource_locators`, `assets`, `content_generations`, `content_templates`, `content_skills`, `songs`, `transcription_tasks`, `avatars`, `avatar_video_generations`, `resource_collection`, `studio_projects`, `convai_analysis_items`
- `creator_user_id` (string, required, nullable) — L'ID dell'utente che ha creato la risorsa.
- `anonymous_access_level_override` (enum, required, nullable) — Il livello di accesso per gli utenti anonimi. Se è None, la risorsa non è condivisa pubblicamente.
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `role_to_group_ids` (map from string to list of string, required) — Una mappatura tra slot di concessione e ID di gruppo. Le chiavi sono i ruoli di accesso predefiniti più gli ID dei ruoli personalizzati del workspace ('role_...'). Quando la risorsa viene condivisa con un utente, l'ID del gruppo corrisponde all'ID dell'utente.
- `share_options` (list of ShareOptionResponseModel, required) — Elenco delle opzioni per condividere ulteriormente la risorsa nel workspace. Si tratta di utenti che non hanno ancora accesso alla risorsa.

## Errors

### 422 Unprocessable Entity Error

Errore di convalida

- `detail` (list of ValidationError, optional)

## Types

### ShareOptionResponseModel

- `name` (string, required) — Il nome del principale.
- `id` (string, required) — L'ID del principale.
- `type` (enum, required) — Il tipo di principale: utente, gruppo o account di servizio (in 'key').
  - Allowed values: `user`, `group`, `key`

### ValidationError

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

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "resource_id": "4ZUqyldxf71HqUbcP2Lc",
  "resource_name": "My Custom Voice",
  "resource_type": "voice",
  "creator_user_id": "5zavrE1kZXv2lFw9BKgEkf0B5Wqo",
  "anonymous_access_level_override": "viewer",
  "role_to_group_ids": {
    "admin": [
      "5zavrE1kZXv2lFw9BKgEkf0B5Wqo"
    ],
    "editor": [
      "8ruQDGM2R4w1mFbHI5aROCUjIpJZ"
    ],
    "role_01jd7yq2k8f0abcd1234wxyz": [
      "9mQrTx4vNb2wKpLs6ZyE1cHgUdFa"
    ],
    "viewer": []
  },
  "share_options": [
    {
      "name": "user@example.com",
      "id": "i2YYI6huwBmcgYydAXARmQJc3pmX",
      "type": "user"
    },
    {
      "name": "mygroup",
      "id": "x1AfvYKAmiqxCnbvZeNXHqqthJaC",
      "type": "group"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/workspace/resources/resource_id"

querystring = {"resource_type":"voice"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/workspace/resources/resource_id?resource_type=voice';
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/workspace/resources/resource_id?resource_type=voice"

	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/workspace/resources/resource_id?resource_type=voice")

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/workspace/resources/resource_id?resource_type=voice")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/workspace/resources/resource_id?resource_type=voice');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/workspace/resources/resource_id?resource_type=voice");
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/workspace/resources/resource_id?resource_type=voice")! 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()
```