> ## Documentation Index
> Fetch the complete documentation index at: https://densify-sync-changelog-14.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add webhook to an analysis

> Only allowed if the analysis does not already have a webhook.



## OpenAPI

````yaml openapi/public_cloud/Analysis_Webhook.yaml POST /webhook/analysis/{platformType}/{platformSubType}/{analysisId}
openapi: 3.1.0
info:
  title: Kubex – Analysis Webhook API
  version: 1.0.0
  description: >
    Manage webhook definitions for analyses. Supports listing by platform,
    getting, adding, updating, and deleting a webhook for a specific analysis.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.example.com
security: []
tags:
  - name: Analysis Webhook
paths:
  /webhook/analysis/{platformType}/{platformSubType}/{analysisId}:
    post:
      tags:
        - Analysis Webhook
      summary: Add webhook to an analysis
      description: Only allowed if the analysis does not already have a webhook.
      operationId: addAnalysisWebhook
      parameters:
        - name: platformType
          in: path
          required: true
          schema:
            type: string
            enum:
              - cloud
              - containers
        - name: platformSubType
          in: path
          required: true
          schema:
            type: string
            enum:
              - aws
              - gcp
              - azure
              - kubernetes
        - name: analysisId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
            examples:
              add:
                value:
                  uri: https://mycallbackServer:443/api/test/webhook
                  authType: basic
                  authValue: saasUser:password1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusMessage'
              examples:
                ok:
                  value:
                    message: ok
                    status: 200
        '400':
          description: Analysis webhook already exists.
        '404':
          description: Analysis webhook not found.
components:
  schemas:
    WebhookRequest:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Fully-qualified webhook URI reachable by Kubex.
        authType:
          type: string
          description: e.g., "Basic", "Bearer".
        authValue:
          type: string
          description: Credential (user:pass or token).
      required:
        - uri
    StatusMessage:
      type: object
      properties:
        message:
          type: string
        status:
          type: integer
      required:
        - message
        - status

````