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

# Test Webhook Delivery

> This endpoint will send test data to your webhook endpoint so you may verify your integration

## Overview

Use this endpoint to trigger a test webhook delivery to your configured endpoint. This allows you to verify that your webhook integration is working correctly before receiving live production data.

## Testing Your Integration

When you call this endpoint, Benzinga will send a test webhook payload to your configured `destination` URL. This test delivery follows the same format and retry logic as production webhook deliveries.

### What to Expect

1. **Immediate Response**: The API returns a `200` status code if the test delivery was triggered successfully
2. **Test Payload**: Your webhook endpoint receives a test payload in the same format as production data
3. **Delivery Headers**: The test delivery includes the `X-BZ-Delivery` header just like production deliveries

### Verify Your Integration

Use this endpoint to confirm:

* Your webhook endpoint is publicly accessible
* Your endpoint can parse the webhook payload format correctly
* Your endpoint responds with appropriate status codes (2xx for success)
* Your endpoint responds within the 30-second timeout
* Your idempotency logic correctly handles the `X-BZ-Delivery` header and payload `id` field

## Best Practices

* Test with non-production webhook endpoints first
* Verify your endpoint responds with `200` or `204` status codes
* Confirm your logging and monitoring capture the test delivery
* Check that your deduplication logic works with the test delivery ID
* Test error scenarios by temporarily returning error status codes

## Troubleshooting

### 424 Delivery Error

If you receive a `424` status code, the system could not deliver the test payload to your destination endpoint. Common causes:

* Destination URL is not publicly accessible
* Destination endpoint is returning error status codes
* Network connectivity issues
* SSL/TLS certificate errors on the destination endpoint

### 400 Invalid Request

Verify that all required parameters are provided and correctly formatted:

* `destination` must be a valid HTTPS URL
* `version` must be `webhook/v1`
* `kind` must be `News/v1`

<ResponseExample>
  ```json Response (200 OK) theme={null}
  {
    "status": "success"
  }
  ```

  ```json Response (400 Bad Request) theme={null}
  {
    "error": "Invalid destination URL"
  }
  ```

  ```json Response (424 Failed Dependency) theme={null}
  {
    "error": "Failed to deliver test payload to destination"
  }
  ```

  ```json Response (401 Unauthorized) theme={null}
  {
    "ok": false,
    "errors": [
      {
        "code": "auth_failed",
        "id": "unauthorized",
        "value": "Invalid or missing authentication token"
      }
    ]
  }
  ```

  ```json Response (404 Not Found) theme={null}
  {
    "ok": false,
    "errors": [
      {
        "code": "no_data_found",
        "id": "not_found",
        "value": "No data found for the specified parameters"
      }
    ]
  }
  ```

  ```json Response (500 Internal Server Error) theme={null}
  {
    "ok": false,
    "errors": [
      {
        "code": "internal_server_error",
        "id": "server_error",
        "value": "An unexpected error occurred while processing your request"
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml /openapi/webhook_api.spec.yml GET /api/v1/webhook/test
openapi: 3.0.0
info:
  contact: {}
  description: Test webhook delivery to verify your integration is working correctly
  title: Webhook API
  version: 1.0.0
servers:
  - url: https://api.benzinga.com
security: []
paths:
  /api/v1/webhook/test:
    get:
      summary: Test Webhook Delivery
      description: >-
        This endpoint will send test data to your webhook endpoint so you may
        verify your integration
      operationId: get-webhook-test
      parameters:
        - name: destination
          in: query
          required: true
          description: The webhook endpoint URL where the test data will be sent
          schema:
            type: string
            format: uri
          example: https://your-endpoint.com/webhook
        - name: version
          in: query
          required: true
          description: API version, currently webhook/v1
          schema:
            type: string
            enum:
              - webhook/v1
            default: webhook/v1
        - name: kind
          in: query
          required: true
          description: Identifies the message kind for the test payload
          schema:
            type: string
            enum:
              - News/v1
              - Signals/v1
              - Earnings/v1
              - Ratings/v1
              - Dividends/v1
              - IPOs/v1
              - Guidance/v1
              - Splits/v1
              - OptionActivity/v1
              - Conference/v1
              - Economics/v1
              - Offerings/v1
              - MA/v1
              - Retail/v1
              - FDA/v1
              - WIIMs/v1
              - SECInsiderTransaction/v1
              - GovernmentTrade/v1
            default: News/v1
        - name: token
          in: query
          required: false
          description: Specify token to have data transformed for production usage
          schema:
            type: string
      responses:
        '200':
          description: Success - Test webhook delivery was sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
        '400':
          description: Invalid request - Inspect response body for details
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid destination URL
        '424':
          description: >-
            Delivery error - System encountered an error delivering the test
            payload
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to deliver test payload to destination
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal server error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Key
      description: Your Benzinga API key

````