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

# Receive alert events



## OpenAPI

````yaml /api/openapi.yaml post /webhooks/v1/integrations/{integration}/alert-events
openapi: 3.1.0
info:
  title: OpenCluster Control Plane API
  version: 0.1.0
  description: HTTP contract for the OpenCluster product API and inbound webhook endpoints.
  license:
    name: Apache-2.0
servers:
  - url: http://localhost:8080
    description: Local self-hosted deployment
security: []
tags:
  - name: Authentication
  - name: Organizations
  - name: Members
  - name: Sessions
  - name: Policy
  - name: Audit
  - name: Integration Types
  - name: Integrations
  - name: Relays
  - name: Incidents
  - name: Investigations
  - name: Conversations
  - name: Postmortems
  - name: Webhook Deliveries
  - name: Webhook Intake
  - name: Metadata
paths:
  /webhooks/v1/integrations/{integration}/alert-events:
    parameters:
      - $ref: '#/components/parameters/IntegrationID'
    post:
      tags:
        - Webhook Intake
      summary: Receive alert events
      operationId: receiveAlertEvents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/GenericWebhookRequest'
                - $ref: '#/components/schemas/AlertmanagerWebhookRequest'
      responses:
        '200':
          $ref: '#/components/responses/WebhookDuplicate'
        '202':
          $ref: '#/components/responses/WebhookAccepted'
        '400':
          $ref: '#/components/responses/WebhookRejected'
        '401':
          $ref: '#/components/responses/WebhookUnauthorized'
        '413':
          $ref: '#/components/responses/WebhookOversized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/WebhookUnavailable'
      security:
        - WebhookToken: []
components:
  parameters:
    IntegrationID:
      name: integration
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
  schemas:
    GenericWebhookRequest:
      type: object
      additionalProperties: false
      required:
        - eventId
        - status
        - title
        - severity
        - startedAt
        - deduplicationKey
      allOf:
        - if:
            properties:
              status:
                const: resolved
          then:
            required:
              - resolvedAt
            properties:
              resolvedAt: {}
        - if:
            properties:
              status:
                const: firing
          then:
            not:
              required:
                - resolvedAt
              properties:
                resolvedAt: {}
      properties:
        eventId:
          type: string
          minLength: 1
          maxLength: 256
        status:
          type: string
          enum:
            - firing
            - resolved
        title:
          type: string
          minLength: 1
          pattern: .*\S.*
          description: >-
            Leading and trailing whitespace is removed before enforcing the
            512-character limit.
        severity:
          type: string
          enum:
            - info
            - warning
            - critical
        startedAt:
          $ref: '#/components/schemas/Timestamp'
        resolvedAt:
          $ref: '#/components/schemas/Timestamp'
        deduplicationKey:
          type: string
          minLength: 1
          maxLength: 256
        labels:
          type: object
          maxProperties: 32
          propertyNames:
            minLength: 1
            maxLength: 64
          additionalProperties:
            type: string
            maxLength: 256
        annotations:
          type: object
          maxProperties: 32
          propertyNames:
            minLength: 1
            maxLength: 64
          additionalProperties:
            type: string
            maxLength: 2048
        sourceUrl:
          type: string
          format: uri
          maxLength: 2048
          pattern: ^https?://
    AlertmanagerWebhookRequest:
      type: object
      required:
        - alerts
      additionalProperties: true
      properties:
        version:
          type: string
        groupKey:
          type: string
          maxLength: 512
        truncatedAlerts:
          type: integer
          minimum: 0
        alerts:
          type: array
          minItems: 1
          maxItems: 2048
          items:
            type: object
            required:
              - status
              - fingerprint
              - startsAt
            additionalProperties: true
            properties:
              status:
                type: string
                enum:
                  - firing
                  - resolved
              fingerprint:
                type: string
                minLength: 1
                maxLength: 512
              startsAt:
                $ref: '#/components/schemas/Timestamp'
              endsAt:
                $ref: '#/components/schemas/Timestamp'
              labels:
                type: object
                additionalProperties:
                  type: string
              annotations:
                type: object
                additionalProperties:
                  type: string
              generatorURL:
                type: string
                maxLength: 2048
    UUID:
      type: string
      format: uuid
    Timestamp:
      type: string
      format: date-time
    WebhookStatus:
      type: object
      additionalProperties: false
      required:
        - status
      properties:
        status:
          type: string
          maxLength: 128
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: string
          minLength: 1
          maxLength: 1024
          example: the selected Organization is not available to this caller
        reason:
          type: string
          enum:
            - credential_rejected
            - session_expired
            - session_revoked
        requires:
          type: string
          minLength: 1
          maxLength: 128
  responses:
    WebhookDuplicate:
      description: Delivery was already accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookStatus'
    WebhookAccepted:
      description: Delivery durably accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookStatus'
    WebhookRejected:
      description: Permanent malformed delivery.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookStatus'
    WebhookUnauthorized:
      description: Missing or invalid webhook credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookStatus'
    WebhookOversized:
      description: Body exceeds 1 MiB.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookStatus'
    RateLimited:
      description: A bounded concurrency or request limit was reached.
      headers:
        Retry-After:
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WebhookUnavailable:
      description: Delivery could not be durably recorded; retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookStatus'
  securitySchemes:
    WebhookToken:
      type: apiKey
      in: header
      name: X-OpenCluster-Token
      description: >-
        Static sender credential. It authenticates the sender and does not sign
        the body.

````