> ## 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.

# Create webhook endpoint

> Register an HTTPS endpoint that receives signed QA.tech events. Returns the signing secret once.



## OpenAPI

````yaml /api-reference/api.json post /v1/webhook-endpoints
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:
    post:
      tags:
        - Webhooks
      summary: Create webhook endpoint
      description: >-
        Register an HTTPS endpoint that receives signed QA.tech events. Returns
        the signing secret once.
      operationId: CreateWebhookEndpoint
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookEndpointRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWebhookEndpointResponse'
components:
  schemas:
    CreateWebhookEndpointRequest:
      type: object
      required:
        - url
        - eventTypes
      properties:
        url:
          type: string
          maxLength: 2048
          description: >-
            HTTPS URL that receives signed POST requests. Private and internal
            addresses are rejected.
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          minItems: 1
        description:
          type: string
          maxLength: 200
        testPlanShortIds:
          type: array
          items:
            $ref: '#/components/schemas/TestPlanShortId'
          minItems: 1
          maxItems: 100
          description: >-
            Send `run.completed` only for runs of these test plans. Omit to send
            it for every run.
        onlyFailures:
          type: boolean
          description: Send `run.completed` only when the run failed or errored.
        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.
    CreateWebhookEndpointResponse:
      type: object
      required:
        - success
        - endpoint
        - secret
      properties:
        success:
          type: boolean
        endpoint:
          $ref: '#/components/schemas/WebhookEndpoint'
        secret:
          type: string
          description: >-
            Signing secret (`whsec_...`) for verifying the `webhook-signature`
            header per the Standard Webhooks spec. Store it now: it is only
            returned here.
    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.