Test a webhook configuration before creating it
POST/accounts/{account_id}/data-security/posture/webhooks/evaluate
Sends a test webhook event to the specified destination URL to verify the webhook endpoint is reachable and properly configured. This allows customers to validate their webhook configuration before creating the actual webhook resource.
The test payload includes:
- event_type: “webhook.test”
- timestamp: Current UTC timestamp
- message: Test message indicating this is from Cloudflare CASB
- data: Object with test: true
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Body ParametersJSON
Test a webhook configuration before creating it
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/data-security/posture/webhooks/evaluate \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"authentication_type": "Bearer Auth",
"destination_url": "https://example.com/webhook",
"headers": [
{
"key": "Authorization",
"value": "Bearer token123"
},
{
"key": "X-Custom-Header",
"value": "value"
}
],
"signing_secret": "my-secret-key"
}'{
"errors": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"messages": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"success": true,
"result": {
"message": "Webhook test successful",
"status_code": 200,
"success": true
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"messages": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"success": true,
"result": {
"message": "Webhook test successful",
"status_code": 200,
"success": true
}
}