Webhooks

Validate Webhook

Changed on

Validates a webhook body against the same schema, URL rules, and body template check used by POST /api/v2/webhooks. The webhook is never persisted. Use this endpoint at plan time (e.g. from a Terraform provider) to check that a webhook configuration is valid before applying it. Name uniqueness is not checked.

post/api/v2/webhooks/validate

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/webhooks/validate
  • Auth
    HTTP bearer

Request body

namestring required

Webhook name. Must be unique per service within the team.

service'slack' | 'incidentio' | 'generic' required

Webhook service type.

urlstring uri required

Webhook destination URL.

descriptionstring

Webhook description, shown in the UI.

titleEmojiboolean

Set to false to omit the state emoji prefix from notification titles sent through this webhook. Unset or true keeps the default prefix.

bodystring

Optional Handlebars request body template. Only for generic/incidentio; rejected for slack. Rejected with a 400 if it does not compile or calls a helper other than eq and the Handlebars built-ins.

headersobject

Write-only. Custom HTTP headers sent with the webhook request. Never returned on read. Only for generic/incidentio; rejected for slack. Each value is capped at 4096 characters.

queryParamsobject

Write-only. Query parameters appended to the webhook URL. Never returned on read. Only for generic/incidentio; rejected for slack. Each value is capped at 4096 characters.

Example request

{
  "name": "Production Alerts",
  "service": "slack",
  "url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
  "description": "Sends critical alerts to the #incidents channel",
  "body": "{\"alert\": \"{{title}}\", \"severity\": \"{{level}}\"}",
  "headers": {
    "Authorization": "Bearer secret-token"
  }
}

Response

Validation result. HTTP 200 is always returned for valid and invalid bodies — a non-200 response means the request itself failed (auth, server error, etc.).

validboolean required

True when the body passes all validation rules.

normalizedobject nullable required

The parsed webhook body, without the write-only headers and queryParams. Populated when valid is true, null when valid is false.

Changes