> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-parschat.parstechai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-parschat.parstechai.com/_mcp/server.

# Send a test event

POST https://api-chat.parstechai.com/v1/webhooks/test

Queues a test event to your configured webhook so you can verify your wiring before real traffic arrives.

**It is a real delivery.** Signed with your secret, carrying your custom headers, and retried on the same schedule as any other event — so it exercises signature verification and your firewall rules, not just reachability.

Its `data` carries `"test": true` so your handler can discard it rather than creating a conversation from it.

Takes no body. Poll [`GET /v1/webhooks/deliveries`](/api-reference/webhooks/list-webhook-deliveries) with the returned `delivery_id` to see what your endpoint answered.

Reference: https://docs-parschat.parstechai.com/api-reference/webhooks/send-test-webhook-event

## Authentication

- `Authorization` header (bearer token, required) — Your API key, issued by ParsChat sales. One key per account, spanning every robot you own. Send it as `Authorization: Bearer pk_live_…`.

## Response

### 202

Queued. The delivery is attempted in the background.

- `delivery_id` (string, optional) — Look this up on the deliveries endpoint.
- `status` (enum, optional) — Its state at the moment it was queued.
  - Allowed values: `pending`, `delivered`, `failed`, `dead_lettered`

## Errors

### 401 Unauthorized Error

The key is missing, wrong, revoked, or past its expiry date. All four answer `invalid_key`: telling an expired key from an unknown one would confirm to whoever holds a leaked key that it was once real.

- `error` (ErrorError, optional)

### 403 Forbidden Error

The call is understood but not permitted: a missing role, a lapsed plan, or exhausted capacity.

- `error` (ErrorError, optional)

### 422 Unprocessable Entity Error

No webhook URL is configured for your account yet. Set one in your ParsChat panel first.

- `error` (ErrorError, optional)

### 429 Too Many Requests Error

You are calling the API too fast. `details` names the limit you are held to. This never means an automated reply to an end customer was discarded: those are queued, not dropped.

- `error` (ErrorError, optional)

### 500 Internal Server Error

Something failed on our side. Retry with backoff, and quote `request_id` if it persists.

- `error` (ErrorError, optional)

### 503 Service Unavailable Error

A service we depend on (a channel provider, or our AI service) is unavailable. Retry with backoff.

- `error` (ErrorError, optional)

## Types

### ErrorError

- `code` (string, optional) — Stable machine-readable code. Branch on this, not on the message.
- `message` (string, optional) — Human-readable explanation. Wording may change.
- `request_id` (string, optional) — Log this. It is what lets support find your exact request.
- `details` (map from string to any, optional) — Machine-readable context for the code. On `capacity_exhausted` it carries `occupied`, `requested` and `capacity`; on `rate_limited`, `limit_per_minute` and `window_seconds`.

## Examples

**Response**

```json
{
  "delivery_id": "dlv_4mN6pL",
  "status": "pending"
}
```

**SDK Code**

```python Queued for delivery
import requests

url = "https://api-chat.parstechai.com/v1/webhooks/test"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Queued for delivery
const url = 'https://api-chat.parstechai.com/v1/webhooks/test';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Queued for delivery
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-chat.parstechai.com/v1/webhooks/test"

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

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Queued for delivery
require 'uri'
require 'net/http'

url = URI("https://api-chat.parstechai.com/v1/webhooks/test")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Queued for delivery
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-chat.parstechai.com/v1/webhooks/test")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-chat.parstechai.com/v1/webhooks/test', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Queued for delivery
using RestSharp;

var client = new RestClient("https://api-chat.parstechai.com/v1/webhooks/test");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Queued for delivery
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-chat.parstechai.com/v1/webhooks/test")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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