APIWebhooks

Validate a webhook condition

Validate a condition expression without saving it.

POST
/webhooks/cel/validate

Validate a condition expression without saving it.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

view_webhooks

Request Body

application/json
  1. body

Request body for validating a condition without saving it.

expression*string

CEL expression to validate.

Length1 <= length
events?array<string>

Actions the webhook subscribes to, which decide the payload fields the expression may reference. Defaults to every action.

Response Body

The request has succeeded.

application/json
  1. response
valid*boolean

Whether the expression is valid

error?string

Human-readable error message if invalid

position?integer

Character offset of the error in the expression

Formatint32
curl -X POST "https://example.com/webhooks/cel/validate" \  -H "Content-Type: application/json" \  -d '{    "expression": "string"  }'
{  "valid": true,  "error": "string",  "position": 0}