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

# Lista webhooks för arbetsyta

GET https://api.elevenlabs.io/v1/workspace/webhooks

Lista alla webhooks för en arbetsyta

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

- `include_usages` (boolean, optional, default: false) — Om aktiva användningar av webhooken ska inkluderas, endast tillgängligt för administratörer

## Response

### 200

Lyckat svar

- `webhooks` (list of WorkspaceWebhookResponseModel, required) — Lista över webhooks som för närvarande har konfigurerats för arbetsytan

## Errors

### 422 Unprocessable Entity Error

Valideringsfel

- `detail` (list of ValidationError, optional)

## Types

### WorkspaceWebhookResponseModel

- `name` (string, required) — Visningsnamnet för denna webhook.
- `webhook_id` (string, required) — Det unika ID:t för den här webhooken.
- `webhook_url` (string, required) — HTTPS-återanropsadressen som anropas när denna webhook utlöses på plattformen.
- `is_disabled` (boolean, required) — Om webhooken har inaktiverats manuellt av en användare.
- `is_auto_disabled` (boolean, required) — Om webhooken har inaktiverats automatiskt på grund av upprepade fel i följd under en längre tid.
- `created_at_unix` (integer, required) — Ursprunglig tidpunkt då webhooken skapades.
- `auth_type` (enum, required) — Autentiseringsläget som används för att skydda webhooken.
  - Allowed values: `hmac`, `oauth2`, `mtls`
- `usage` (list of WorkspaceWebhookUsageResponseModel, optional, nullable) — Listan över produkter som för närvarande är konfigurerade för att utlösa denna webhook.
- `events` (list of enum, optional, nullable) — Händelser på arbetsytenivå som den här webhooken för närvarande prenumererar på. Fylls bara i när användningsdata begärs.
  - Allowed values: `voice_library_removal_notice`, `speech_to_text`, `agent_qa`, `flows`
- `most_recent_failure_error_code` (integer, optional, nullable) — Den senaste felkoden som returnerades från callback-URL:en.
- `most_recent_failure_timestamp` (integer, optional, nullable) — Den senaste tidpunkten då webhooken misslyckades. Fel är alla andra koder än 200 som returneras av callback-URL:en.

### ValidationError

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

### WorkspaceWebhookUsageResponseModel

- `usage_type` (enum, required)
  - Allowed values: `ConvAI Agent Settings`, `ConvAI Settings`, `Voice Library Removal Notices`, `Speech to Text`, `Agent QA Evaluations`, `ConvAI Alerting`, `Flows`, `Dubbing`

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "webhooks": [
    {
      "name": "My Webhook",
      "webhook_id": "123",
      "webhook_url": "https://elevenlabs.io/example-callback-url",
      "is_disabled": false,
      "is_auto_disabled": false,
      "created_at_unix": 123456789,
      "auth_type": "hmac",
      "usage": [
        {
          "usage_type": "ConvAI Settings"
        }
      ],
      "most_recent_failure_error_code": 404,
      "most_recent_failure_timestamp": 123456799
    }
  ]
}
```

**SDK Code**

```python
import requests

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

querystring = {"include_usages":"false"}

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

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/workspace/webhooks?include_usages=false';
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/webhooks?include_usages=false"

	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/webhooks?include_usages=false")

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/webhooks?include_usages=false")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/workspace/webhooks?include_usages=false');

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

```csharp
using RestSharp;

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