> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Webhook

> Send a test payload to verify webhook connectivity

## Overview

Sends a test payload to the webhook URL to verify connectivity and ensure your endpoint is properly configured to receive webhook events.

## Endpoint

<ParamField path="agent_id" type="string" required>
  Agent UUID
</ParamField>

<ParamField path="webhook_id" type="string" required>
  Webhook UUID
</ParamField>

## Request

<RequestExample>
  ```bash theme={null}
  curl -X POST \
    'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/test' \
    -H 'Authorization: Bearer YOUR_TOKEN'
  ```

  ```javascript theme={null}
  const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/test', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN'
    }
  });
  const data = await response.json();
  ```

  ```php theme={null}
  <?php

  $client = new \GuzzleHttp\Client();
  $response = $client->post('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/test', [
      'headers' => [
          'Authorization' => 'Bearer YOUR_TOKEN',
      ],
  ]);
  $data = json_decode($response->getBody());
  ```
</RequestExample>

## Test Payload

When you call the test endpoint, the following payload will be sent to your webhook URL:

```json theme={null}
{
  "event": "webhook.test",
  "agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
  "agent_name": "My Agent",
  "webhook_id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
  "webhook_name": "My Webhook",
  "timestamp": "2025-09-03T23:19:51.000Z",
  "test": true
}
```

## Response

<ResponseField name="success" type="boolean">
  Indicates if the test webhook was sent successfully
</ResponseField>

<ResponseField name="message" type="string">
  Success message
</ResponseField>

<ResponseField name="data" type="object">
  Test results data
</ResponseField>

<ResponseField name="data.status_code" type="integer">
  HTTP status code returned by your webhook endpoint
</ResponseField>

<ResponseField name="data.response_time" type="integer">
  Response time in milliseconds
</ResponseField>

<ResponseExample title="Successful Test">
  ```json theme={null}
  {
    "success": true,
    "message": "Test webhook sent successfully",
    "data": {
      "status_code": 200,
      "response_time": 150
    }
  }
  ```
</ResponseExample>

## Error responses

<ResponseExample title="401 Unauthorized">
  ```json theme={null}
  {
    "message": "Missing Bearer Token"
  }
  ```
</ResponseExample>

<ResponseExample title="404 Not Found">
  ```json theme={null}
  {
    "success": false,
    "message": "Agent not found in this environment."
  }
  ```
</ResponseExample>

<ResponseExample title="404 Webhook Not Found">
  ```json theme={null}
  {
    "success": false,
    "message": "Webhook not found."
  }
  ```
</ResponseExample>

<ResponseExample title="Test Failed">
  ```json theme={null}
  {
    "success": false,
    "message": "Webhook test failed: Connection timeout"
  }
  ```
</ResponseExample>

<ResponseExample title="Test Failed - Invalid Response">
  ```json theme={null}
  {
    "success": false,
    "message": "Webhook test failed: HTTP 500 Internal Server Error"
  }
  ```
</ResponseExample>

## Important notes

* The test payload uses the `webhook.test` event type to distinguish it from real events
* Your webhook endpoint should return a 2xx HTTP status code for successful tests
* The test respects the webhook's configured timeout and retry settings
* Use this endpoint to verify connectivity before going live with webhook events
* Test payloads include the `test: true` field to help identify them in your logs

## Webhook Endpoint Requirements

Your webhook endpoint should:

1. **Accept POST requests** with JSON payloads
2. **Return 2xx status codes** for successful processing
3. **Respond within the configured timeout** (default: 30 seconds)
4. **Handle the test event type** appropriately
5. **Implement proper signature verification** if using webhook secrets

## Related endpoints

* [List Agent Webhooks](/api-reference/endpoints/list-agent-webhooks) - Get all webhooks for an agent
* [Create Webhook](/api-reference/endpoints/create-webhook) - Set up a new webhook
* [Get Webhook Details](/api-reference/endpoints/get-webhook-details) - Retrieve specific webhook information
* [Update Webhook](/api-reference/endpoints/update-webhook) - Modify webhook configuration
* [Delete Webhook](/api-reference/endpoints/delete-webhook) - Remove webhook configuration
* [Toggle Webhook Status](/api-reference/endpoints/toggle-webhook-status) - Enable/disable webhook
