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

# Create a webhook

> Registers an endpoint to receive events. The URL must be `https`.

Every delivery is signed: the body is sent as-is with no envelope, the event type travels in a header, `Idenfy-TX-Timestamp` carries the epoch seconds we signed at, and `Idenfy-TX-Signature` carries `v1=` followed by an HMAC-SHA256 of `{timestamp}.{body}` using the secret — recompute it on your side, compare, and reject a timestamp more than five minutes from your own clock so a captured delivery cannot be replayed at you. Send `secret` to choose your own, or omit it and one is generated. **This is the only response that ever contains the secret**, and only when it was generated for you: store it now, because regenerating later invalidates the one your receiver is already verifying against. `headers` adds fixed headers to every delivery, for an endpoint behind its own authentication.



## OpenAPI

````yaml /openapi/transaction-monitoring.json post /api/v1/webhooks/
openapi: 3.0.3
info:
  title: iDenfy Transaction Monitoring API
  version: v1
  description: >-
    Submit transactions and events for AML monitoring, and read back the alerts,
    cases and reports they produce.
servers:
  - url: https://ivs-tx-monitoring.idenfy.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Ingest
    description: Submit transactions and events for monitoring.
  - name: Transactions
    description: Read back submitted transactions and their rule hits.
  - name: Rules
    description: Detection rules evaluated against every submission.
  - name: Alerts
    description: Alerts opened when a rule matches.
  - name: Investigations
    description: Cases opened from one or more alerts.
  - name: SARs
    description: Suspicious activity reports and their attachments.
  - name: Sanctions screening
    description: Sanctions and PEP screening of transaction parties.
  - name: AML monitoring
    description: Ongoing AML monitoring of screened parties.
  - name: Party suspensions
    description: ''
  - name: Webhooks
    description: Outbound event delivery to your endpoints.
  - name: Custom fields
    description: Your own transaction attributes, declared so rules can match them.
  - name: Reference lists
    description: Named value lists rules can reference.
  - name: Notification rules
    description: Slack and email notifications for alerts.
  - name: Reports
    description: Generated compliance reports.
paths:
  /api/v1/webhooks/:
    post:
      tags:
        - Webhooks
      summary: Create a webhook
      description: >-
        Registers an endpoint to receive events. The URL must be `https`.


        Every delivery is signed: the body is sent as-is with no envelope, the
        event type travels in a header, `Idenfy-TX-Timestamp` carries the epoch
        seconds we signed at, and `Idenfy-TX-Signature` carries `v1=` followed
        by an HMAC-SHA256 of `{timestamp}.{body}` using the secret — recompute
        it on your side, compare, and reject a timestamp more than five minutes
        from your own clock so a captured delivery cannot be replayed at you.
        Send `secret` to choose your own, or omit it and one is generated.
        **This is the only response that ever contains the secret**, and only
        when it was generated for you: store it now, because regenerating later
        invalidates the one your receiver is already verifying against.
        `headers` adds fixed headers to every delivery, for an endpoint behind
        its own authentication.
      operationId: webhooks_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WebhookCreate:
      type: object
      properties:
        partnerId:
          type: string
          writeOnly: true
          nullable: true
          description: >-
            Target partner id; honored only for multi-partner operators, ignored
            otherwise.
        name:
          type: string
          description: Your own label for this endpoint
          maxLength: 100
        url:
          type: string
          format: uri
          description: HTTPS destination events are delivered to
          maxLength: 500
        secret:
          type: string
          writeOnly: true
          description: >-
            Secret used to sign each delivery, as an HMAC-SHA256 of
            `{timestamp}.{body}` sent as `v1=<digest>` in the
            `Idenfy-TX-Signature` header alongside `Idenfy-TX-Timestamp`. Never
            returned on a read: omit it to keep the stored one, or on create to
            have one generated and returned once
          maxLength: 255
        headers:
          type: object
          additionalProperties:
            type: string
            maxLength: 1024
          writeOnly: true
          description: >-
            Fixed headers added to every delivery, for an endpoint behind its
            own authentication. At most 10, and never returned on a read. The
            content type, signature, timestamp and event-type headers are set
            automatically and cannot be overridden
        events:
          type: array
          items:
            type: string
          description: >-
            Event types delivered to this endpoint, from the documented set.
            Sent on an update, this replaces the list rather than adding to it
        isActive:
          type: boolean
          default: true
          description: Whether deliveries are attempted; repeated failures turn this off
      required:
        - url
    WebhookResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Primary key
        partnerId:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
          description: Operator-facing label; falls back to the URL when blank
        url:
          type: string
          format: uri
          readOnly: true
          description: Destination URL for signed event POSTs
        hasSecret:
          type: boolean
          readOnly: true
        headerNames:
          type: array
          items:
            type: string
          readOnly: true
        events:
          readOnly: true
          description: Subscribed event types, e.g. alert.created
        isActive:
          type: boolean
          readOnly: true
          description: False once manually disabled or auto-disabled
        suspendedAt:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: >-
            When repeated delivery failures disabled the webhook. Its events are
            held, not dropped, and sent once it is enabled again. Null when it
            is active or was disabled by hand.
        retryCount:
          type: integer
          readOnly: true
          description: Cumulative failed-delivery counter
        lastDeliveryAt:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: Timestamp of the most recent delivery attempt
        lastStatusCode:
          type: integer
          readOnly: true
          nullable: true
          description: HTTP status of the most recent attempt
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - createdAt
        - events
        - hasSecret
        - headerNames
        - id
        - isActive
        - lastDeliveryAt
        - lastStatusCode
        - name
        - partnerId
        - retryCount
        - suspendedAt
        - updatedAt
        - url
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

## Related topics

- [Zapier Webhooks](https://documentation.idenfy.com/integrations/zapier-webhooks.md)
- [Create a Session](https://documentation.idenfy.com/age-estimation/create-session.md)
- [Create a notification rule](https://documentation.idenfy.com/api-reference/transaction-monitoring/notification-rules/create-a-notification-rule.md)
- [KYC Webhooks](https://documentation.idenfy.com/kyc/webhooks.md)
- [Create a Bank Card Session](https://documentation.idenfy.com/bank-card/create-session.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.