> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickStack: Validate Webhook

> **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> ClickStack: 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.

Beta

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. \
\
&#x20;ClickStack: 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.

#### Permission

The API key must have the `control-plane:service:manage-clickstack-api` permission.


## OpenAPI

````yaml _specs/cloud-openapi.json POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/webhooks/validate
openapi: 3.1.1
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-1312017
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: Notifications
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: Snapshot
  - name: API keys
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
  - name: UDF
  - name: Query API endpoints
  - name: Saved queries
paths:
  /v1/organizations/{organizationId}/services/{serviceId}/clickstack/webhooks/validate:
    post:
      tags:
        - ClickStack
      summary: 'ClickStack: Validate Webhook'
      description: >-
        **This endpoint is in beta.** API contract is stable, and no breaking
        changes are expected in the future. <br /><br /> ClickStack: 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.
      operationId: clickStackValidateWebhook
      parameters:
        - in: path
          name: organizationId
          description: ID of the organization that owns the service.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: serviceId
          description: ID of the ClickStack service.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClickStackWebhookInput'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 200
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
                  result:
                    $ref: '#/components/schemas/ClickStackValidateWebhookResponse'
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
components:
  schemas:
    ClickStackWebhookInput:
      properties:
        name:
          description: Webhook name. Must be unique per service within the team.
          type: string
          example: Production Alerts
        service:
          description: Webhook service type.
          type: string
          enum:
            - slack
            - incidentio
            - generic
          example: slack
        url:
          description: Webhook destination URL.
          type: string
          example: https://hooks.slack.com/services/EXAMPLE/WEBHOOK/URL
        description:
          description: Webhook description, shown in the UI.
          type: string
          example: 'Sends critical alerts to the #incidents channel'
        body:
          description: >-
            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.
          type: string
          example: '{"alert": "{{title}}", "severity": "{{level}}"}'
        headers:
          $ref: '#/components/schemas/ClickStackWebhookInputHeaders'
        queryParams:
          $ref: '#/components/schemas/ClickStackWebhookInputQueryParams'
      required:
        - name
        - service
        - url
    ClickStackValidateWebhookResponse:
      properties:
        valid:
          description: True when the body passes all validation rules.
          type: boolean
        errors:
          type: array
          description: Validation errors. Empty when valid is true.
          items:
            $ref: '#/components/schemas/ClickStackValidateWebhookResponseErrorsItem'
        normalized:
          oneOf:
            - $ref: '#/components/schemas/ClickStackValidateWebhookResponseNormalized'
            - type: 'null'
      required:
        - valid
        - errors
        - normalized
    ClickStackWebhookInputHeaders:
      type: object
      properties: {}
      additionalProperties:
        type: string
        maxLength: 4096
    ClickStackWebhookInputQueryParams:
      type: object
      properties: {}
      additionalProperties:
        type: string
        maxLength: 4096
    ClickStackValidateWebhookResponseErrorsItem:
      properties:
        path:
          description: Dot-separated field path, or empty string for top-level errors.
          type: string
        message:
          description: Human-readable error description.
          type: string
      required:
        - path
        - message
    ClickStackValidateWebhookResponseNormalized:
      properties: {}
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi
      x-permission-scopes: >-
        The scope list of a `security` requirement holds ClickHouse Cloud API
        key permission ids (for example `control-plane:organization:view`), not
        OAuth scopes. OpenAPI has no field for API key permissions, so this is
        the closest available place. A key must hold every permission listed on
        an operation to call it; an operation with no scopes needs none beyond a
        valid key. Every operation declares at most one requirement object,
        always for this scheme, so the list is only ever conjunctive —
        alternative sets of permissions are never expressed.

````