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

# Elenca procedure

GET https://api.elevenlabs.io/v1/convai/agents/{agent_id}/branches/{branch_id}/procedures

Elenca le procedure associate a questo branch dell'agente. Per impostazione predefinita, le bozze non pubblicate hanno la precedenza sull'ultima versione salvata. Passa agent_version_id per elencare invece uno snapshot pubblicato. has_draft è true quando una procedura presenta modifiche in bozza non pubblicate su questo branch. Il contenuto della procedura non è incluso; usa Get Procedure per leggerne il body.

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

### Path parameters

- `agent_id` (string, required) — ID dell'agente da cui ottenere la bozza della procedura
- `branch_id` (string, required) — ID del branch da cui ottenere la bozza della procedura

### Query parameters

- `agent_version_id` (string, optional, nullable) — L'ID della versione dell'agente per cui recuperare la procedura.

## Response

### 200

Risposta riuscita

- `procedures` (list of ProcedureListItemResponseModel, required) — Procedure sul branch con i relativi metadati sensibili allo stato della bozza.

## Errors

### 422 Unprocessable Entity Error

Errore di convalida

- `detail` (list of ValidationError, optional)

## Types

### ProcedureListItemResponseModel

- `procedure_id` (string, required) — ID della procedura
- `has_draft` (boolean, required) — True quando la procedura presenta modifiche in bozza non pubblicate in questo branch, ovvero una procedura creata o modificata di recente e non ancora pubblicata. Quando è true, il nome, il tipo e il trigger riflettono tale bozza.
- `version_id` (string, optional, nullable) — ID della versione di una procedura. None per una procedura mai versionata.
- `name` (string, optional, default: ) — Nome della procedura
- `type` (enum, optional, default: free_form) — Tipo di procedura
  - Allowed values: `free_form`, `deterministic`, `folder`
- `trigger` (string, optional, default: ) — Indica quando l'agente deve usare questa procedura. Una stringa vuota indica che si tratta di una sottoprocedura che deve avviarsi solo quando viene richiamata da un'altra procedura.
- `referenced_tool_ids` (list of string, optional) — ID degli strumenti a cui fa riferimento il contenuto della procedura
- `referenced_kb_ids` (list of string, optional) — ID delle knowledge base a cui si fa riferimento nel contenuto della procedura
- `referenced_procedure_ids` (list of string, optional) — ID delle procedure a cui si fa riferimento nel contenuto della procedura
- `referenced_dynamic_variables` (list of string, optional) — Nomi delle variabili dinamiche usati nel contenuto della procedura
- `folder_parent_id` (string, optional, nullable) — ID della procedura della cartella in cui è inserita questa procedura. None indica la radice.

### ValidationError

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

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "procedures": [
    {
      "procedure_id": "agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3",
      "has_draft": false,
      "version_id": "agtprcv_7rbqxer9o12cyxi55ckw6sgz1dl4",
      "name": "Customer Support Procedure",
      "type": "free_form",
      "trigger": "When the customer asks for support",
      "referenced_tool_ids": [
        "tool_123"
      ],
      "referenced_kb_ids": [
        "kb_123"
      ],
      "referenced_procedure_ids": [
        "agtprc_other"
      ],
      "referenced_dynamic_variables": [
        "customer_id"
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures"

querystring = {"agent_version_id":"agtvrsn_8901k4t9z5defmb8vh3e9361y7nj"}

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

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj';
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/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj"

	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/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj")

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/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj");
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/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t/procedures?agent_version_id=agtvrsn_8901k4t9z5defmb8vh3e9361y7nj")! 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()
```