# Update a Webhook

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/webhook_endpoints/{id}:
    post:
      summary: Update a Webhook
      deprecated: false
      description: ''
      tags:
        - API Reference/Webhooks
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              x-apifox-overrides: {}
              type: object
              x-apifox-refs:
                01GHRKYNN1VMEDFR4WTW7K37QT: &ref_0
                  $ref: '#/components/schemas/Webhook'
                  x-apifox-overrides:
                    id: null
                    object: null
                    api_version: null
                    created: null
                    livemode: null
                    status: null
                    secret: null
              x-apifox-orders:
                - 01GHRKYNN1VMEDFR4WTW7K37QT
                - disabled
              properties:
                description:
                  type: string
                  description: An optional description of what the webhook is used for.
                enabled_events:
                  type: array
                  items:
                    type: string
                  description: 'The list of events to enable for this endpoint. '
                metadata:
                  type: object
                  properties: {}
                  x-apifox-orders: []
                  description: 'Set of key-value pairs that you can attach to an object. '
                  x-apifox-ignore-properties: []
                url:
                  type: string
                  description: The URL of the webhook endpoint.
                disabled:
                  type: boolean
                  description: Disable the webhook endpoint if set to true.
              x-apifox-ignore-properties:
                - description
                - enabled_events
                - metadata
                - url
            example:
              url: https://another_address.com
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema: *ref_0
              example:
                id: we_1M3fqHHTdYyGj2Y6LeGVaamQ
                object: webhook_endpoint
                api_version: null
                created: 1668344601
                description: This is my webhook, I like it a lot
                enabled_events:
                  - payment_intent.succeeded
                  - payment_intent.payment_failed
                  - charge.refund.updated
                  - charge.dispute.updated
                livemode: false
                metadata: {}
                status: enabled
                url: https://example.com/my/webhook/endpoint
                secret: whsec_9rMfZUGWM3gTTBtn0f8kPEfmiIJCmzQi
          headers: {}
          x-apifox-name: OK
      security:
        - basic: []
      x-apifox-folder: API Reference/Webhooks
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/1296482/apis/api-42648393-run
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object, like "we_xxxxx"
        object:
          type: string
          title: ''
          default: '"webhook_endpoint"'
          description: '**"webhook_endpoint"** '
        api_version:
          type: string
          description: The API version events are rendered as for this webhook endpoint.
        created:
          type: integer
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        description:
          type: string
          description: An optional description of what the webhook is used for.
        enabled_events:
          type: array
          items:
            type: string
          description: 'The list of events to enable for this endpoint. '
        livemode:
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: []
          description: 'Set of key-value pairs that you can attach to an object. '
          x-apifox-ignore-properties: []
        status:
          type: string
          description: The status of the webhook. It can be enabled or disabled.
        secret:
          type: string
          description: >-
            The endpoint’s secret, used to generate webhook signatures. Only
            returned at creation.
        url:
          type: string
          description: The URL of the webhook endpoint.
      x-apifox-orders:
        - id
        - object
        - api_version
        - created
        - description
        - enabled_events
        - livemode
        - metadata
        - status
        - secret
        - url
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    basic:
      type: http
      scheme: basic
servers:
  - url: https://apitest.wooshpay.com
    description: 官网测试
security:
  - basic: []

```
