> This is a page from the ElevenLabs documentation. For an index of the documentation, fetch https://elevenlabs.io/docs/llms.txt.

# टेस्ट वेबहुक इवेंट भेजें

POST https://api.elevenlabs.io/v1/workspace/webhooks/{webhook_id}/test
Content-Type: application/json

दिए गए प्रकार का एक सैंपल इवेंट वेबहुक को एक बार भेजता है और एंडपॉइंट का स्टेटस कोड, रिस्पॉन्स समय, कंटेंट टाइप और रिस्पॉन्स आकार लौटाता है। टेस्ट इवेंट पर असली इवेंट जैसी सिग्नेचर होती है, उन्हें कभी दोबारा नहीं भेजा जाता और वे रीडिलीवरी के साथ हर वेबहुक के लिए प्रति मिनट 10 की सीमा साझा करते हैं।

Reference: https://elevenlabs.io/docs/api-reference/webhooks/test

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

- `webhook_id` (string, required) — webhook की ID।

### Body (application/json)

This endpoint expects a Body_Send_test_webhook_event_v1_workspace_webhooks__webhook_id__test_post.

- `webhook_type` (enum, required) — जिस event type का सैंपल भेजना है।
  - Allowed values: `project_conversion_status`, `chapter_conversion_status`, `post_call_transcription`, `post_call_transcription_otel`, `post_call_audio`, `post_call_unredacted_transcription`, `post_call_unredacted_transcription_otel`, `post_call_unredacted_audio`, `post_call_analysis`, `call_initiation_failure`, `conversation_initiation_client_data`, `answering_machine_detection`, `voice_removal_notice`, `voice_removal_notice_withdrawn`, `voice_removed`, `speech_to_text_transcription`, `webhook_error`, `speech_to_text_batch`, `agent_qa_evaluation_completed`, `convai_alerting_notification`, `flows_generation`, `flows_template_run`, `dubbing_project_ready`, `dubbing_project_failed`, `dubbing_language_completed`, `dubbing_language_failed`, `support_ticket_message_added`

## Response

### 200

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

- `delivery_id` (string, required) — डिलीवरी ID, जो ElevenLabs-Webhook-Delivery-Id header में भी भेजी जाती है।
- `outcome` (enum, required) — इस प्रयास में क्या हुआ।
  - Allowed values: `delivered`, `failed_retry_scheduled`, `failed_exhausted`, `failed_no_retry`, `failed_retry_error`, `dropped_queue_full`, `dropped_payload_too_large`, `skipped_disabled`, `not_sent_configuration`
- `response_code` (integer, required, nullable) — अगर आपके endpoint ने जवाब दिया, तो उसका लौटाया गया HTTP status।
- `latency_ms` (integer, required, nullable) — आपके endpoint को जवाब देने में लगा समय, मिलीसेकंड में।
- `response_content_type` (string, required, nullable) — अगर आपके endpoint ने जवाब दिया, तो उसके जवाब का Content-Type।
- `response_body_bytes` (integer, required, nullable) — अगर आपके endpoint ने जवाब दिया, तो उसके response body का आकार bytes में। body को कभी स्टोर या लौटाया नहीं जाता।
- `failure_origin` (string, required, nullable) — विफलता कहाँ से आई: recipient, configuration, external_transport या timeout।

## Errors

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

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

### ValidationErrorLocItems

- string
- integer

## Examples

**Request**

```json
{
  "webhook_type": "project_conversion_status"
}
```

**Response**

```json
{
  "delivery_id": "string",
  "outcome": "delivered",
  "response_code": 1,
  "latency_ms": 1,
  "response_content_type": "string",
  "response_body_bytes": 1,
  "failure_origin": "string"
}
```

**SDK Code**

```python
import requests

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

payload = { "webhook_type": "project_conversion_status" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/workspace/webhooks/webhook_id/test';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"webhook_type":"project_conversion_status"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

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

	payload := strings.NewReader("{\n  \"webhook_type\": \"project_conversion_status\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	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/webhook_id/test")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"webhook_type\": \"project_conversion_status\"\n}"

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.post("https://api.elevenlabs.io/v1/workspace/webhooks/webhook_id/test")
  .header("Content-Type", "application/json")
  .body("{\n  \"webhook_type\": \"project_conversion_status\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/workspace/webhooks/webhook_id/test', [
  'body' => '{
  "webhook_type": "project_conversion_status"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/workspace/webhooks/webhook_id/test");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"webhook_type\": \"project_conversion_status\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["webhook_type": "project_conversion_status"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/workspace/webhooks/webhook_id/test")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```