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

# Create webhook endpoint

> Creates a developer-managed webhook endpoint. The signing secret is returned
once in the response and cannot be retrieved again.




## OpenAPI

````yaml /openapi.yaml post /v1/webhook-endpoints
openapi: 3.1.0
info:
  title: Meum Public Merchant API
  version: 1.0.0
  description: >
    Public merchant API for programmatic payment management: invoices,
    transactions,

    payment links, webhooks, and WooCommerce integration.


    Authenticate with a store-scoped API key (`sk_live_*`) via Bearer token.

    Base URL: https://api.meum.io
  contact:
    name: Meum Support
    email: support@meum.io
    url: https://meum.io
servers:
  - url: https://api.meum.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Service health checks
  - name: Invoices
    description: Invoice lifecycle
  - name: Transactions
    description: On-chain payment transactions
  - name: Payment Links
    description: Reusable payment link management
  - name: Webhooks
    description: Webhook endpoint and delivery management
  - name: Integrations
    description: Third-party platform integrations
paths:
  /v1/webhook-endpoints:
    post:
      tags:
        - Webhooks
      summary: Create webhook endpoint
      description: >
        Creates a developer-managed webhook endpoint. The signing secret is
        returned

        once in the response and cannot be retrieved again.
      operationId: createWebhookEndpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookEndpointRequest'
            example:
              name: Production webhook
              url: https://api.example.com/webhooks/meum
              events:
                - invoice.created
                - invoice.paid
      responses:
        '201':
          description: Webhook endpoint created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointCreateResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    CreateWebhookEndpointRequest:
      type: object
      required:
        - url
      properties:
        name:
          type: string
          minLength: 1
          default: Default
          description: >
            **Optional.** Label for this endpoint in your dashboard. Defaults to
            `"Default"` if omitted.
        url:
          type: string
          format: uri
          description: |
            **Required.** HTTPS URL on your server that accepts POST requests.
            Must respond with HTTP 2xx when delivery succeeds.
        events:
          type: array
          items:
            type: string
          description: >
            **Optional.** Which events to send (e.g. `invoice.paid`,
            `invoice.expired`).

            Defaults to standard invoice lifecycle events if omitted.
    WebhookEndpointCreateResponse:
      type: object
      description: >-
        Response immediately after creating a webhook endpoint. The signing
        secret is shown only once.
      properties:
        id:
          type: string
          pattern: ^(inv_|txn_|plink_|wh_|whd_|evt_|int_)[0-9a-z]{20,32}$
          description: Webhook endpoint ID (`wh_...`).
        name:
          type: string
          description: Endpoint display name.
        url:
          type: string
          format: uri
          description: Destination URL for webhook deliveries.
        secret:
          type: string
          description: Signing secret. Store this securely; it is shown only at creation.
          example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
        secret_prefix:
          type: string
          description: Prefix of the secret for later identification.
          example: '01234567'
        events:
          type: array
          items:
            type: string
          description: Subscribed event types.
        message:
          type: string
          description: Reminder to save the secret before leaving the creation flow.
          example: Save this secret now. It will not be shown again.
    PublicApiError:
      type: object
      description: Standard error envelope for Public API v1 endpoints.
      required:
        - error
      properties:
        error:
          type: object
          description: Error details for the failed request.
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              description: High-level error category used for programmatic handling.
              enum:
                - invalid_request
                - authentication_error
                - permission_error
                - not_found
                - conflict
                - rate_limit_error
                - api_error
              example: not_found
            code:
              type: string
              description: >-
                Stable machine-readable error code (for example
                `invoice_not_found`).
              example: invoice_not_found
            message:
              type: string
              description: Human-readable explanation suitable to show in logs or UI.
              example: Invoice not found
            param:
              type: string
              description: Request field associated with the error, when applicable.
              example: url
            request_id:
              type: string
              description: Unique request ID. Include when contacting support.
              example: req_a1b2c3d4e5f6789012345678
      example:
        error:
          type: not_found
          code: invoice_not_found
          message: Invoice not found
          request_id: req_a1b2c3d4e5f6789012345678
  responses:
    Forbidden:
      description: Insufficient scope or permission
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
    UnprocessableEntity:
      description: Validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Store-scoped API key. Prefix with `sk_live_`.
        Example: `Authorization: Bearer sk_live_EXAMPLE_DO_NOT_USE`

````