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

# Update an Endpoint

> Change an endpoint's name, URL or events, or turn delivery on or off.

Send any of `name`, `url`, `events` and `enabled`. Fields you leave out don't change.

* **Enabling** requires a [verified](https://docs.prava.space/api-reference/webhooks/verify-endpoint.md) endpoint. Otherwise the request returns `409 WEBHOOK_NOT_VERIFIED`.
* **Changing the URL** turns the endpoint off and clears its verification and health state. Verify the new URL, then enable it in a separate request. Changing the URL and enabling in the same request returns `409 WEBHOOK_NOT_VERIFIED`.
* **Pausing** with `"enabled": false` stops new events from being queued for this endpoint.

Prava can also pause an endpoint automatically after repeated delivery failures; it keeps queuing new subscribed events while it waits. See [Delivery and retries](https://docs.prava.space/webhooks/delivery.md).


## OpenAPI

````yaml api-reference/openapi.json PATCH /v1/webhook-endpoints/{endpointId}
openapi: 3.1.0
info:
  title: Prava Payments API
  description: >-
    Server-side REST API for Prava Payments. All requests are authenticated with
    your secret key (sk_test_* in sandbox, sk_live_* in production).
  version: 1.0.0
servers:
  - url: https://sandbox.api.prava.space
    description: Sandbox
  - url: https://api.prava.space
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/webhook-endpoints/{endpointId}:
    patch:
      tags:
        - Webhooks
      summary: PATCH /v1/webhook-endpoints/{endpointId}
      description: >-
        Gated preview; application and environment are derived from the secret
        key. See the Webhooks guide for delivery and signing contracts.
      parameters:
        - name: endpointId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointPatch'
      responses:
        '200':
          description: >-
            Successful operation; endpoints never include stored signing
            secrets.
          content:
            application/json:
              schema:
                type: object
                required:
                  - endpoint
                properties:
                  endpoint:
                    $ref: '#/components/schemas/WebhookEndpoint'
        '400':
          description: Invalid input or cursor
        '404':
          description: Resource not found in this application
        '409':
          description: Verification, idempotency, or endpoint state conflict
        '503':
          description: Preview disabled or temporarily unavailable
components:
  schemas:
    WebhookEndpointPatch:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 80
        url:
          type: string
          format: uri
          maxLength: 2048
          description: Public HTTPS port 443, no query, userinfo or redirects.
        events:
          type: array
          minItems: 1
          maxItems: 16
          uniqueItems: true
          items:
            type: string
            enum:
              - payment.credentials_ready
              - payment.succeeded
              - payment.failed
              - card_enrollment.completed
              - card_enrollment.failed
              - card_enrollment.cancelled
              - card_enrollment.expired
              - mandate.created
              - mandate.creation_failed
              - mandate.creation_cancelled
              - mandate.creation_expired
              - mandate.paused
              - mandate.resumed
              - mandate.cancelled
              - mandate.expired
              - quote.request_failed
        enabled:
          type: boolean
    WebhookEndpoint:
      type: object
      required:
        - id
        - owner_id
        - environment
        - name
        - url
        - events
        - revision
        - enabled
        - verified_at
        - deleted_at
        - created_at
        - schema_version
        - consecutive_failures
        - circuit_until
        - blocked_reason
      properties:
        id:
          type: string
          description: Endpoint ID, starting with `whe_`.
          examples:
            - whe_0123456789abcdef0123456789abcdef
        owner_id:
          type: string
          description: Your application's account ID, starting with `ma_`.
        environment:
          type: string
          enum:
            - sandbox
            - production
        name:
          type: string
          minLength: 1
          maxLength: 80
        url:
          type: string
          format: uri
          description: The HTTPS URL that receives events.
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          description: Event types sent to this endpoint.
        revision:
          type: string
          description: Increases by one each time the URL changes. Returned as a string.
        enabled:
          type: boolean
          description: Whether new events are delivered. New endpoints start with `false`.
        verified_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When verification succeeded. Cleared when the URL changes.
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: '`null` for active endpoints.'
          examples:
            - null
        created_at:
          type: string
          format: date-time
        schema_version:
          type: string
          description: Payload schema version sent to this endpoint.
          examples:
            - '2026-10-08'
        consecutive_failures:
          type: integer
          minimum: 0
          description: Failed deliveries in a row. Resets after a delivery is accepted.
          examples:
            - 0
        circuit_until:
          type:
            - string
            - 'null'
          format: date-time
          description: Deliveries are held until this time after repeated failures.
          examples:
            - null
        blocked_reason:
          type:
            - string
            - 'null'
          enum:
            - RECEIVER_UNACKNOWLEDGED
            - DELIVERY_FAILURE_LIMIT
            - HTTP_GONE
            - DESTINATION_BLOCKED
            - null
          description: >-
            Why Prava paused deliveries, or `null`. See [Endpoint health
            reasons](/webhooks/delivery#endpoint-health-reasons).
          examples:
            - null
    WebhookEventType:
      type: string
      enum:
        - payment.credentials_ready
        - payment.succeeded
        - payment.failed
        - card_enrollment.completed
        - card_enrollment.failed
        - card_enrollment.cancelled
        - card_enrollment.expired
        - mandate.created
        - mandate.creation_failed
        - mandate.creation_cancelled
        - mandate.creation_expired
        - mandate.paused
        - mandate.resumed
        - mandate.cancelled
        - mandate.expired
        - quote.request_failed
      description: A webhook event type.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your secret key: sk_test_* (sandbox) or sk_live_* (production).'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.