curl --request POST \
--url https://api.godiligent.ai/webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhook_url": "<string>",
"is_active": true,
"secret": "<string>",
"events": []
}
'import requests
url = "https://api.godiligent.ai/webhooks"
payload = {
"webhook_url": "<string>",
"is_active": True,
"secret": "<string>",
"events": []
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_url: '<string>', is_active: true, secret: '<string>', events: []})
};
fetch('https://api.godiligent.ai/webhooks', 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.godiligent.ai/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'webhook_url' => '<string>',
'is_active' => true,
'secret' => '<string>',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.godiligent.ai/webhooks"
payload := strings.NewReader("{\n \"webhook_url\": \"<string>\",\n \"is_active\": true,\n \"secret\": \"<string>\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.godiligent.ai/webhooks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"<string>\",\n \"is_active\": true,\n \"secret\": \"<string>\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_url\": \"<string>\",\n \"is_active\": true,\n \"secret\": \"<string>\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"webhook_url": "<string>",
"is_active": true,
"has_secret": true,
"status": "active",
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_delivery_status": 123,
"events": [
"cdd_state_changed"
]
}Register Webhook
Register a webhook endpoint for your account.
curl --request POST \
--url https://api.godiligent.ai/webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhook_url": "<string>",
"is_active": true,
"secret": "<string>",
"events": []
}
'import requests
url = "https://api.godiligent.ai/webhooks"
payload = {
"webhook_url": "<string>",
"is_active": True,
"secret": "<string>",
"events": []
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_url: '<string>', is_active: true, secret: '<string>', events: []})
};
fetch('https://api.godiligent.ai/webhooks', 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.godiligent.ai/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'webhook_url' => '<string>',
'is_active' => true,
'secret' => '<string>',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.godiligent.ai/webhooks"
payload := strings.NewReader("{\n \"webhook_url\": \"<string>\",\n \"is_active\": true,\n \"secret\": \"<string>\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.godiligent.ai/webhooks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"<string>\",\n \"is_active\": true,\n \"secret\": \"<string>\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_url\": \"<string>\",\n \"is_active\": true,\n \"secret\": \"<string>\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"webhook_url": "<string>",
"is_active": true,
"has_secret": true,
"status": "active",
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_delivery_status": 123,
"events": [
"cdd_state_changed"
]
}Endpoint
POST /webhooks
Creates a new webhook endpoint for the authenticated customer. You can register up to 10 webhooks, each with its own URL, secret, and event filter. Event delivery fans out to every active webhook whose filter matches the event.
POSTs updated the same record. It now always creates a new webhook. To modify an existing webhook, use PATCH /webhooks/{webhook_id}. To remove one, use DELETE /webhooks/{webhook_id}.Request Body
JSON object with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
| webhook_url | string | Yes | HTTPS URL to receive webhook events. Must start with https://. |
| secret | string | No | Secret used to sign webhook payloads (X-Signature header). Write-only — never returned by the API. Empty string is treated as no secret. |
| is_active | boolean | No | Whether the webhook is active. Defaults to true. |
| events | string[] | No | List of event types to subscribe to. Defaults to an empty list (no events). |
Supported Event Types
cdd_state_changed: When the state of a CDD changes to either inconclusive or complete.monitoring_alert_fired: When a monitoring alert is fired on failure.cdd_document_fetched: When a new document is successfully added to a CDD case.search_completed: When a name screening search completes and results are available.alert_remediated: When a name screening alert has been remediated (all hits resolved).flow_run_completed: When a flow run finishes successfully (COMPLETED).flow_run_failed: When a flow run fails (FAILED).
Example Request
{
"webhook_url": "https://www.testing-webhooks.com",
"is_active": true,
"secret": "some-secret",
"events": ["cdd_state_changed", "monitoring_alert_fired", "search_completed"]
}
Responses
201 Created
The webhook was created. The response body is the created webhook (thesecret is never echoed — has_secret indicates whether one is set).
{
"id": "df89eb16-4c6a-439f-b668-7cca0cd786fa",
"webhook_url": "https://www.testing-webhooks.com",
"is_active": true,
"has_secret": true,
"status": "active",
"last_delivery_at": null,
"last_delivery_status": null,
"events": ["cdd_state_changed", "monitoring_alert_fired", "search_completed"]
}
400 Bad Request
Input validation failed.{
"error": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"path": ["webhook_url"],
"message": "Expected string, received number"
}
]
}
409 Conflict
The customer already has the maximum of 10 webhooks. Delete one before creating another.{
"error": "Webhook limit reached (max 10 per customer)"
}
500 Internal Server Error
Unexpected error occurred.{
"error": "Internal server error"
}
Authentication
This endpoint requires authentication. The webhook is associated with the authenticated customer.Authorizations
Body
Must be a valid URL starting with https.
Indicates if the webhook is active.
Secret used to sign the webhook payload, passed in the X-Signature header. Write-only — it is never returned by the API.
List of events to trigger the webhook. If not provided, no events will be triggered.
cdd_state_changed: When the state of a CDD changes to either inconclusive or complete.
monitoring_alert_fired: When a monitoring alert is fired on failure.
cdd_document_fetched: When a new document is successfully added to a CDD case.
search_completed: When a name screening search completes and results are available.
alert_remediated: When a name screening alert has been remediated.
flow_run_completed: When a flow run finishes successfully (COMPLETED).
flow_run_failed: When a flow run fails (FAILED).
cdd_state_changed, monitoring_alert_fired, cdd_document_fetched, search_completed, alert_remediated, flow_run_completed, flow_run_failed Response
Webhook created.
Unique ID for the webhook.
Whether a signing secret is configured. The secret itself is never returned.
Derived health: disabled when inactive, failing when the last delivery returned a non-2xx status, otherwise active.
active, failing, disabled Timestamp of the most recent delivery attempt, or null if none.
HTTP status code of the most recent delivery attempt, or null if none.
cdd_state_changed, monitoring_alert_fired, cdd_document_fetched, search_completed, alert_remediated, flow_run_completed, flow_run_failed