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

# Update Webhook Event

> Update a webhook endpoint URL or subscribed event types



## OpenAPI

````yaml put /v1/webhook-events/{webhook_event_id}
openapi: 3.1.1
info:
  title: HitPay API
  description: >-
    Accept PayNow, FPX, QRIS, GrabPay, cards, and 40+ payment methods with a
    single API. Production base URL: https://api.hit-pay.com, Sandbox:
    https://api.sandbox.hit-pay.com
  version: '1.0'
servers:
  - url: https://api.hit-pay.com
    description: Production
  - url: https://api.sandbox.hit-pay.com
    description: Sandbox
security: []
paths:
  /v1/webhook-events/{webhook_event_id}:
    put:
      summary: Update Webhook Event
      description: >-
        This endpoint allows you to update a webhook event. You can use the
        `webhook_event_id` to update the webhook event's details.
      operationId: update-webhook-event
      parameters:
        - name: X-BUSINESS-API-KEY
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
            example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
        - name: webhook_event_id
          in: path
          description: The Webhook Event id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  examples:
                    - Test Webhook Event
                  description: The name of the webhook event. It is a required field.
                url:
                  type: string
                  description: >-
                    The URL of the webhook, must be a valid URL with `https`
                    protocol. This is the URL that the webhook will send the
                    event data to. It is a required field.
                event_types:
                  type: array
                  items:
                    type: string
                    enum:
                      - charge.created
                      - charge.updated
                      - payout.created
                      - order.created
                      - order.updated
                      - invoice.created
                      - invoice.updated
                      - transfer.created
                      - transfer.updated
                      - transfer.scheduled
                      - transfer.processing
                      - transfer.paid
                      - transfer.failed
                      - transfer.canceled
                  description: >-
                    The event types that the webhook will listen to. It is a
                    required field.
                  examples:
                    - transfer.created
                    - transfer.updated
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 9b2ada28-be3c-47ab-883f-ba72e5d8305d
                    business_id: 9b294222-3a53-427f-9393-95dc6d63ee6c
                    name: Test Webhook Event
                    url: https://google.com
                    event_types:
                      - transfer.created
                      - transfer.updated
                    created_at: '2024-01-24T16:05:10+08:00'
                    updated_at: '2024-01-24T16:05:10+08:00'
              schema:
                type: object
                properties:
                  id:
                    type: string
                  business_id:
                    type: string
                  name:
                    type: string
                  url:
                    type: string
                  event_types:
                    type: array
                    items:
                      type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - business_id
                  - name
                  - url
                  - event_types
                  - created_at
                  - updated_at
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "No query results for model [App\\Business\\Webhook] 973ee456-d28f-4418-93c5-d37e4b311685"
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - >-
                        No query results for model [App\Business\Webhook]
                        973ee456-d28f-4418-93c5-d37e4b311685
      deprecated: false

````