Test Webhook Delivery
curl --request GET \
--url https://api.benzinga.com/api/v1/webhook/test \
--header 'Key: <api-key>'import requests
url = "https://api.benzinga.com/api/v1/webhook/test"
headers = {"Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Key: '<api-key>'}};
fetch('https://api.benzinga.com/api/v1/webhook/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.benzinga.com/api/v1/webhook/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benzinga.com/api/v1/webhook/test"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benzinga.com/api/v1/webhook/test")
.header("Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v1/webhook/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success"
}
{
"error": "Invalid destination URL"
}
{
"error": "Failed to deliver test payload to destination"
}
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "Invalid or missing authentication token"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "No data found for the specified parameters"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "An unexpected error occurred while processing your request"
}
]
}
Webhook API
Test Webhook Delivery
This endpoint will send test data to your webhook endpoint so you may verify your integration
GET
/
api
/
v1
/
webhook
/
test
Test Webhook Delivery
curl --request GET \
--url https://api.benzinga.com/api/v1/webhook/test \
--header 'Key: <api-key>'import requests
url = "https://api.benzinga.com/api/v1/webhook/test"
headers = {"Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Key: '<api-key>'}};
fetch('https://api.benzinga.com/api/v1/webhook/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.benzinga.com/api/v1/webhook/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benzinga.com/api/v1/webhook/test"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benzinga.com/api/v1/webhook/test")
.header("Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v1/webhook/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success"
}
{
"error": "Invalid destination URL"
}
{
"error": "Failed to deliver test payload to destination"
}
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "Invalid or missing authentication token"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "No data found for the specified parameters"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "An unexpected error occurred while processing your request"
}
]
}
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 configureddestination URL. This test delivery follows the same format and retry logic as production webhook deliveries.
What to Expect
- Immediate Response: The API returns a
200status code if the test delivery was triggered successfully - Test Payload: Your webhook endpoint receives a test payload in the same format as production data
- Delivery Headers: The test delivery includes the
X-BZ-Deliveryheader 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-Deliveryheader and payloadidfield
Best Practices
- Test with non-production webhook endpoints first
- Verify your endpoint responds with
200or204status 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 a424 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:destinationmust be a valid HTTPS URLversionmust bewebhook/v1kindmust beNews/v1
{
"status": "success"
}
{
"error": "Invalid destination URL"
}
{
"error": "Failed to deliver test payload to destination"
}
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "Invalid or missing authentication token"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "No data found for the specified parameters"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "An unexpected error occurred while processing your request"
}
]
}
Authorizations
Your Benzinga API key
Query Parameters
The webhook endpoint URL where the test data will be sent
API version, currently webhook/v1
Available options:
webhook/v1 Identifies the message kind for the test payload
Available options:
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 Specify token to have data transformed for production usage
Response
Success - Test webhook delivery was sent successfully
Example:
"success"
Was this page helpful?