> ## 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



## OpenAPI

````yaml post /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: '2024-08-01'
servers:
  - url: https://api.monime.io/
security:
  - bearerAuth: []
paths:
  /webhooks:
    post:
      tags:
        - Webhook
      summary: Create Webhook
      operationId: CreateWebhook
      parameters:
        - name: Monime-Space-Id
          in: header
          description: >-
            The value is the tenancy parameter that Monime used to determine
            which space the request is intended for.
          required: true
          schema:
            maxLength: 100
            pattern: ^spc-.*$
            type: string
            description: >-
              The value is the tenancy parameter that Monime used to determine
              which space the request is intended for.
        - name: Idempotency-Key
          in: header
          description: >-
            This header is used to uniquely identify a request, ensuring that
            the operation is not performed more than once during retries.
          required: true
          schema:
            maxLength: 64
            type: string
            description: >-
              This header is used to uniquely identify a request, ensuring that
              the operation is not performed more than once during retries.
      requestBody:
        content:
          application/json:
            schema:
              title: CreateWebhook
              required:
                - name
                - url
                - events
              type: object
              properties:
                name:
                  maxLength: 100
                  minLength: 1
                  type: string
                  description: The name of the webhook.
                url:
                  type: string
                  description: The URL of the webhook
                isActive:
                  type: boolean
                  description: Denotes whether the webhook is active.
                  default: false
                apiVersion:
                  type: string
                  description: The API version the webhook supports.
                events:
                  maxItems: 100
                  minItems: 1
                  uniqueItems: true
                  type: array
                  items:
                    type: string
                  description: The list of events the webhook is subscribed to.
                  nullable: true
                alertEmails:
                  maxItems: 3
                  uniqueItems: true
                  type: array
                  items:
                    type: string
                  description: >-
                    The list email address to send alert notifications to when
                    the webhook is failing.
                  nullable: true
                verificationMethod:
                  type: object
                  properties:
                    hmac256:
                      required:
                        - secret
                      type: object
                      properties:
                        secret:
                          maxLength: 100
                          minLength: 32
                          type: string
                          description: Secret used to verify the webhook's signature.
                      description: A HMAC-256 method to verify the webhook
                  description: The verification method of the webhook.
                  nullable: true
                customHeaders:
                  type: object
                  additionalProperties:
                    type: string
                  description: Custom headers of the webhook.
                  nullable: true
                metadata:
                  maxProperties: 100
                  type: object
                  description: Metadata attributes of the webhook.
                  nullable: true
      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:
      required:
        - name
        - url
        - events
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the webhook object
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: The name of the webhook.
          example: My Ecommerce Webhook
        url:
          type: string
          description: The URL where the webhook events are sent.
        isActive:
          type: boolean
          description: Denotes whether the webhook is active.
        apiVersion:
          type: string
          description: The API version the webhook supports.
        events:
          type: array
          items:
            type: string
          description: The list of events that triggers the webhook.
          nullable: true
        alertEmails:
          type: array
          items:
            type: string
          description: >-
            The list email address to send alert notifications to when the
            webhook is failing.
          nullable: true
        verificationMethod:
          type: object
          properties:
            hmac256:
              required:
                - secret
              type: object
              properties:
                secret:
                  maxLength: 100
                  minLength: 32
                  type: string
                  description: Secret used to verify the webhook's signature.
              description: A HMAC-256 method to verify the webhook
          description: The verification method of the webhook.
          nullable: true
        customHeaders:
          maxProperties: 10
          type: object
          additionalProperties:
            type: string
          description: Custom headers of the webhook.
          nullable: true
        createTime:
          type: string
          description: The creation time of the webhook.
          format: date-time
        metadata:
          maxProperties: 100
          type: object
          description: >-
            This holds key-value pairs, where both the keys and values are
            strings not exceeding 64 and 100 characters respectively. This
            allows for flexible and descriptive tagging or additional
            information to be associated with the object.
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication specified with the header Authorization:
        Bearer <access_token>

````