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

# Update webhook endpoint

> Change an endpoint's URL, events or filters, or disable and re-enable it. Re-enabling resets its failure count.



## OpenAPI

````yaml /api-reference/api.json patch /v1/webhook-endpoints/{endpointId}
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  contact:
    name: QA.tech
    url: https://qa.tech
    email: support@qa.tech
  description: API for triggering and managing AI-powered test runs
servers:
  - url: https://api.qa.tech
    description: Production
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: Runs
  - name: Infrastructure
  - name: Test Cases
  - name: Application Builds
  - name: Status badge
  - name: Remote Tunnels
  - name: Chat
  - name: Applications
  - name: Features
  - name: Metrics
  - name: Projects
  - name: Knowledge
  - name: Rules
  - name: Configs
  - name: Labels
  - name: Scenarios
  - name: Crawling
  - name: Webhooks
  - name: Pull requests
  - name: Issues
  - name: Todos
  - name: Automations
  - name: Test plans
  - name: Integrations
paths:
  /v1/webhook-endpoints/{endpointId}:
    patch:
      tags:
        - Webhooks
      summary: Update webhook endpoint
      description: >-
        Change an endpoint's URL, events or filters, or disable and re-enable
        it. Re-enabling resets its failure count.
      operationId: UpdateWebhookEndpoint
      parameters:
        - name: endpointId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookEndpointRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateWebhookEndpointResponse'
components:
  schemas:
    UpdateWebhookEndpointRequest:
      type: object
      properties:
        url:
          type: string
          maxLength: 2048
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          minItems: 1
        description:
          type: string
          nullable: true
          maxLength: 200
          description: Pass null to clear it.
        testPlanShortIds:
          type: array
          items:
            $ref: '#/components/schemas/TestPlanShortId'
          nullable: true
          minItems: 1
          maxItems: 100
          description: Pass null to send `run.completed` for every run.
        onlyFailures:
          type: boolean
        isEnabled:
          type: boolean
          description: >-
            Pass true to re-enable an endpoint QA.tech disabled after repeated
            failures.
        projectShortId:
          allOf:
            - $ref: '#/components/schemas/ProjectShortId'
          description: >-
            Target a specific project by its prefixed short ID
            (proj-slug_shortId or proj_shortId), as returned by the projects
            API. Required for organization-scoped API keys; project-scoped keys
            may only pass their own project's short ID.
    UpdateWebhookEndpointResponse:
      type: object
      required:
        - success
        - endpoint
      properties:
        success:
          type: boolean
        endpoint:
          $ref: '#/components/schemas/WebhookEndpoint'
    WebhookEventType:
      type: string
      enum:
        - run.completed
        - pr_review.published
    TestPlanShortId:
      type: string
      pattern: ^pln(-.+_.+|_.+)$
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    WebhookEndpoint:
      type: object
      required:
        - id
        - url
        - description
        - eventTypes
        - testPlanShortIds
        - onlyFailures
        - isEnabled
        - disabledReason
        - lastDeliveryAt
        - createdAt
      properties:
        id:
          type: string
          description: Endpoint id (UUID)
        url:
          type: string
        description:
          type: string
          nullable: true
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
        testPlanShortIds:
          type: array
          items:
            $ref: '#/components/schemas/TestPlanShortId'
          nullable: true
          description: >-
            `run.completed` is sent only for runs of these test plans. Null
            means every run, including runs without a test plan.
        onlyFailures:
          type: boolean
          description: '`run.completed` is sent only when the run failed or errored.'
        isEnabled:
          type: boolean
        disabledReason:
          type: string
          nullable: true
          description: >-
            Why QA.tech disabled the endpoint, such as repeated delivery
            failures. Cleared when it is re-enabled.
        lastDeliveryAt:
          type: string
          nullable: true
        createdAt:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

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