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

# Update a webhook



## OpenAPI

````yaml openapi.yaml put /webhooks/{endpoint}
openapi: 3.1.0
info:
  title: Notch Pay API
  description: API for integrating payment and money transfer services into applications.
  version: 2.1.0
servers:
  - url: https://api.notchpay.co
    description: Production and Sandbox Environment
security: []
paths:
  /webhooks/{endpoint}:
    put:
      summary: Update a webhook
      operationId: updateWebhook
      parameters:
        - name: endpoint
          in: path
          description: Unique identifier of the webhook
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  example: https://example.com/webhooks
                description:
                  type: string
                  example: Webhook principal mis à jour
                events:
                  type: array
                  items:
                    type: string
                    enum:
                      - payment.created
                      - payment.complete
                      - payment.failed
                      - payment.canceled
                      - payment.expired
                      - transfer.created
                      - transfer.complete
                      - transfer.failed
                      - customer.created
                      - customer.updated
                      - customer.deleted
                      - customer.blocked
                      - customer.unblocked
      responses:
        '202':
          description: Webhook endpoint updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 202
                  status:
                    type: string
                    example: Accepted
                  message:
                    type: string
                    example: Webhook endpoint updated successfully
                  endpoint: 268e1b70-1d5b-478f-b546-b476093a3357
                required:
                  - code
                  - status
                  - message
                  - endpoint
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: b29a71d3-4f97-40ed-a676-731aa1fbe742
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: b29a71d3-4f97-40ed-a676-731aa1fbe742
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: b29a71d3-4f97-40ed-a676-731aa1fbe742
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: b29a71d3-4f97-40ed-a676-731aa1fbe742
      security:
        - ApiKeyAuth: []
        - GrantAuth: []
        - SyncAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    GrantAuth:
      type: apiKey
      in: header
      name: X-Grant
    SyncAuth:
      type: apiKey
      in: header
      name: X-Sync

````