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

# Create Webhook

> Create a new webhook with configuration for target URL, events, headers, and security.



## OpenAPI

````yaml post /v1/webhooks
openapi: 3.0.3
info:
  title: Monime API
  description: Monime REST API. Please visit https://docs.momime.io/api for more details.
  termsOfService: https://monime.io/legal/terms-of-service
  contact:
    name: Monime Developers
    url: https://github.com/monimesl
    email: dev@monime.io
  version: v1
servers:
  - url: https://api.monime.io/
security:
  - bearerAuth: []
paths:
  /v1/webhooks:
    post:
      tags:
        - Webhook
      summary: Create Webhook
      description: >-
        Create a new webhook with configuration for target URL, events, headers,
        and security.
      operationId: CreateWebhook
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            This header is used to uniquely identify a logical request, ensuring
            that it is not processed more than once during retries.
          required: true
          schema:
            maxLength: 64
            type: string
            description: >-
              This header is used to uniquely identify a logical request,
              ensuring that it is not processed more than once during retries.
        - name: Monime-Version
          in: header
          description: Specifies which version of the Monime API will handle this request.
          schema:
            enum:
              - caph.2025-08-23
              - caph.2025-06-20
            type: string
            description: >-
              Specifies which version of the Monime API will handle this
              request.
            nullable: true
        - name: Monime-Space-Id
          in: header
          description: >-
            The value is the tenancy parameter that Monime uses to determine
            which space the request is intended for.
          required: true
          schema:
            maxLength: 64
            pattern: ^spc-.*$
            type: string
            description: >-
              The value is the tenancy parameter that Monime uses to determine
              which space the request is intended for.
      requestBody:
        content:
          application/json:
            schema:
              title: CreateWebhook
              required:
                - name
                - url
                - apiRelease
                - events
              type: object
              properties:
                name:
                  maxLength: 100
                  minLength: 1
                  type: string
                  description: Human-readable name for the webhook configuration.
                  example: My Ecommerce Webhook
                url:
                  maxLength: 255
                  type: string
                  description: Target URL that will receive webhook event payloads.
                enabled:
                  type: boolean
                  description: >-
                    Flag indicating if the webhook should be active upon
                    creation.
                  default: true
                apiRelease:
                  enum:
                    - caph
                    - siriusb
                  type: string
                  description: >-
                    Defines the target API release for this webhook. A release
                    represents a stable snapshot of the API schema. Ensures the
                    webhook receives the latest object schema for a given
                    release cycle.
                  default: caph
                events:
                  maxItems: 100
                  minItems: 1
                  uniqueItems: true
                  type: array
                  items:
                    type: string
                  description: List of event types that should trigger this webhook.
                  nullable: true
                headers:
                  maxProperties: 10
                  type: object
                  additionalProperties:
                    type: string
                  description: >-
                    Optional HTTP headers to include in outbound webhook
                    requests.
                  nullable: true
                alertEmails:
                  maxItems: 2
                  uniqueItems: true
                  type: array
                  items:
                    type: string
                  description: >-
                    Optional email addresses to notify on repeated delivery
                    failures.
                  nullable: true
                verificationMethod:
                  required:
                    - type
                  type: object
                  oneOf:
                    - title: HMAC SHA256
                      required:
                        - type
                        - secret
                      type: object
                      properties:
                        type:
                          enum:
                            - HS256
                          type: string
                          description: >-
                            Indicates the use of HMAC (HS256) as the signature
                            verification method.
                        secret:
                          maxLength: 256
                          minLength: 32
                          type: string
                          description: >-
                            The shared secret used to compute and verify the
                            HMAC signature.
                      additionalProperties: false
                    - title: ECDSA SHA256
                      required:
                        - type
                      type: object
                      properties:
                        type:
                          enum:
                            - ES256
                          type: string
                          description: >-
                            Indicates the use of ECDSA (ES256) as the signature
                            verification method.
                        publicKey:
                          type: string
                          description: >-
                            The ECDSA public key used to verify the webhook
                            signature. It is a a PEM-encoded key on the NIST
                            P-256 (prime256v1 / secp256r1) curve.
                          readOnly: true
                      additionalProperties: false
                  properties:
                    type:
                      enum:
                        - ES256
                        - HS256
                      type: string
                      description: >-
                        The type of verification method in use. Either 'HS256'
                        for HMAC or 'ES256' for ECDSA.
                  description: >-
                    Method to be use to verify the integrity of incoming webhook
                    requests.
                  nullable: true
                metadata:
                  maxProperties: 64
                  type: object
                  additionalProperties:
                    maxLength: 100
                    type: string
                    description: >-
                      Metadata values are free-form strings up to 100
                      characters.
                  description: Custom metadata for tagging or annotating this webhook.
                  nullable: true
              additionalProperties: false
              description: >-
                Create a new webhook with configuration for target URL, events,
                headers, and security.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Represents the status of the query operation, confirming
                      if it was successful. This field is always true
                  messages:
                    type: array
                    items: {}
                    description: >-
                      Contains a list of messages providing relevant information
                      or feedback related to the query or operation
                  result:
                    $ref: '#/components/schemas/Webhook'
components:
  schemas:
    Webhook:
      title: Webhook
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the webhook object.
        name:
          type: string
          description: >-
            Human-readable name for the webhook configuration. Useful for
            identifying its purpose in dashboards or logs.
          example: My Ecommerce Webhook
        url:
          type: string
          description: >-
            Publicly accessible URL that will receive event POST requests from
            this webhook.
        enabled:
          type: boolean
          description: >-
            Indicates whether the webhook is currently enabled. If false, events
            will not be sent.
        events:
          type: array
          items:
            type: string
          description: >-
            List of event types (e.g., 'payment.created') that will trigger this
            webhook.
          nullable: true
        apiRelease:
          enum:
            - caph
            - siriusb
          type: string
          description: >-
            The release identifier of the API expected by this webhook. Ensures
            the webhook receives the latest object schema for a given release
            cycle.
        verificationMethod:
          required:
            - type
          type: object
          oneOf:
            - title: HMAC SHA256
              required:
                - type
                - secret
              type: object
              properties:
                type:
                  enum:
                    - HS256
                  type: string
                  description: >-
                    Indicates the use of HMAC (HS256) as the signature
                    verification method.
                secret:
                  maxLength: 256
                  minLength: 32
                  type: string
                  description: >-
                    The shared secret used to compute and verify the HMAC
                    signature.
              additionalProperties: false
            - title: ECDSA SHA256
              required:
                - type
              type: object
              properties:
                type:
                  enum:
                    - ES256
                  type: string
                  description: >-
                    Indicates the use of ECDSA (ES256) as the signature
                    verification method.
                publicKey:
                  type: string
                  description: >-
                    The ECDSA public key used to verify the webhook signature.
                    It is a a PEM-encoded key on the NIST P-256 (prime256v1 /
                    secp256r1) curve.
                  readOnly: true
              additionalProperties: false
          properties:
            type:
              enum:
                - ES256
                - HS256
              type: string
              description: >-
                The type of verification method in use. Either 'HS256' for HMAC
                or 'ES256' for ECDSA.
          description: Method used to verify the integrity of incoming webhook requests.
          nullable: true
        headers:
          type: object
          additionalProperties:
            type: string
          description: >-
            Optional HTTP headers to include in webhook requests. Useful for
            passing authentication or context info.
          nullable: true
        alertEmails:
          type: array
          items:
            type: string
          description: >-
            Email addresses to notify when delivery to this webhook repeatedly
            fails.
          nullable: true
        createTime:
          type: string
          description: Timestamp when the webhook was created.
          format: date-time
        updateTime:
          type: string
          description: Timestamp when the webhook was last updated.
          format: date-time
          nullable: true
        metadata:
          maxProperties: 64
          type: object
          additionalProperties:
            maxLength: 100
            type: string
            description: Metadata values are free-form strings up to 100 characters.
          description: >-
            Custom metadata for storing additional context or labels for this
            webhook.
          nullable: true
      description: >
        A **Webhook** is a user-defined HTTP endpoint that Monime invokes with a
        **POST request** whenever specific events occur, such as
        **`payment.completed`** or **`payout.failed`**.  

        Webhooks allow you to receive real-time notifications and integrate
        Monime’s event stream directly into your own systems.


        ### Use Cases


        - **Realtime Payment Updates**  
          Receive an immediate notification when a payment succeeds and update your user’s dashboard without polling the API.  

        - **Automated Payout Reconciliation**  
          Trigger accounting workflows or ERP system updates when a payout is marked as `completed` or `failed`.  

        - **Fraud & Risk Monitoring**  
          Stream payment events into your fraud detection system as they happen.  

        ---
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication specified with the header Authorization:
        Bearer <access_token>

````