Test webhook endpoint
curl --request POST \
--url http://localhost:8000/v1/webhooks/{webhook_config_id}/test \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/webhooks/{webhook_config_id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/webhooks/{webhook_config_id}/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_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/webhooks/{webhook_config_id}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:8000/v1/webhooks/{webhook_config_id}/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(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/v1/webhooks/{webhook_config_id}/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/webhooks/{webhook_config_id}/test")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response_body": "{\"received\": true}",
"response_status": 200,
"response_time_ms": 145.3,
"success": true,
"tested_at": "2024-01-15T12:00:00Z",
"url": "https://customer.com/webhooks/docintel",
"webhook_config_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}webhooks
Test webhook endpoint
Test a webhook endpoint by sending a test payload.
Sends a signed test payload to the webhook URL and reports the result.
The test is considered successful if the endpoint returns a 2xx status code.
The test payload includes:
- event: "test"
- timestamp: Current time
- data: { "message": "This is a test webhook from DocIntell" }
Headers sent:
- X-DocIntell-Signature: HMAC-SHA256 signature
- X-DocIntell-Event: test
- Content-Type: application/json
POST
/
v1
/
webhooks
/
{webhook_config_id}
/
test
Test webhook endpoint
curl --request POST \
--url http://localhost:8000/v1/webhooks/{webhook_config_id}/test \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/webhooks/{webhook_config_id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/webhooks/{webhook_config_id}/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_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/webhooks/{webhook_config_id}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:8000/v1/webhooks/{webhook_config_id}/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(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/v1/webhooks/{webhook_config_id}/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/webhooks/{webhook_config_id}/test")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response_body": "{\"received\": true}",
"response_status": 200,
"response_time_ms": 145.3,
"success": true,
"tested_at": "2024-01-15T12:00:00Z",
"url": "https://customer.com/webhooks/docintel",
"webhook_config_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API Key authentication. Format: dk_test_ or dk_live_
Path Parameters
Webhook configuration ID
Response
Test result with response status and timing
Response for testing a webhook endpoint (POST /v1/webhooks/{id}/test).
Sends a test payload to the webhook URL and reports the result. A test is considered successful if the endpoint returns a 2xx status code.
Whether the test was successful (2xx response)
Unique webhook configuration identifier
The webhook URL that was tested
Timestamp when the test was performed (ISO 8601)
HTTP status code from webhook endpoint
Response time in milliseconds
Response body preview (first 500 chars)
Error message if request failed