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

# Ingest a raw event

> Ingests a raw event from your payment provider or backend. Authenticate with a **webhook ingest key** (`clm_wh_...`), not a partner secret key.



## OpenAPI

````yaml /api-reference/openapi.json post /api/webhooks/ingest
openapi: 3.1.0
info:
  title: Clausum API
  version: 1.3.0
  description: >-
    REST API for real-time fraud risk assessment (pay-in and payout), fraud
    reporting, blocklist management, and event ingestion. API version 1.3.0.
    Create Partner API keys (`clm_pub_*`, `clm_sk_*`) in the dashboard under
    Conexiones → Claves API. Webhook ingest uses separate `clm_wh_*` keys
    (Conexiones → Entrada webhooks).
  contact:
    name: Clausum API Support
    email: api@clausum.ai
    url: https://clausum.ai
servers:
  - url: https://sandbox.clausum.ai
    description: Sandbox — integrators and trials
  - url: https://dashboard.clausum.ai
    description: Production dashboard and Partner API
security:
  - apiKeyAuth: []
tags:
  - name: Risk
    description: Real-time risk scoring for pay-in checkout and sessions.
  - name: Payout
    description: Outbound disbursement and treasury transfer assessment.
  - name: Fraud
    description: Report confirmed fraud and trigger the downstream chain.
  - name: Blocklists
    description: Manage dynamic blocklists used during assessment.
  - name: Cases
    description: Manage fraud cases (expedientes) and submit them to regulators.
  - name: Events
    description: Ingest raw events from your payment providers.
  - name: System
    description: Health and status checks.
paths:
  /api/webhooks/ingest:
    post:
      tags:
        - Events
      summary: Ingest a raw event
      description: >-
        Ingests a raw event from your payment provider or backend. Authenticate
        with a **webhook ingest key** (`clm_wh_...`), not a partner secret key.
      operationId: ingestEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestEventRequest'
            examples:
              fraud_alert:
                value:
                  event: fraud_alert
                  data:
                    order_id: ORD-123
                    payment_id: pi_3Nxyz
                    amount: 500000
                    currency: MXN
      responses:
        '200':
          description: Event accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  event_id:
                    type: string
                    format: uuid
                  message:
                    type: string
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - webhookKeyAuth: []
components:
  schemas:
    IngestEventRequest:
      type: object
      properties:
        event:
          type: string
          description: Event type, e.g. `fraud_alert`, `payment.succeeded`.
        type:
          type: string
          description: Alias for `event`.
        data:
          type: object
          additionalProperties: true
    ApiError:
      type: object
      properties:
        error:
          oneOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
                details:
                  type: object
                  additionalProperties: true
  responses:
    ValidationError:
      description: Invalid request body or parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Missing or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Partner secret or publishable key, e.g. `clm_sk_...` or `clm_pub_...`
        (assess only).
      x-default: clm_sk_your_secret_key
    webhookKeyAuth:
      type: http
      scheme: bearer
      description: Webhook ingest key only — `clm_wh_...` for `POST /api/webhooks/ingest`.
      x-default: clm_wh_your_ingest_key

````