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

# Start change review chat

> Start an autonomous change review from either a PR URL or raw change input. Returns 202 with the review conversation.

PR mode reuses the pull request's existing review conversation unless `forceNewConversation` is true or that conversation is archived.

For a GitHub pull request's head commit:
- If a `POST /chat/change-review/prepare` request left a review waiting, this request runs its tests against `applicationOverrides` in the same conversation, with this request's `context`.
- Otherwise it runs a full review.
- If PR triage skipped the commit, it does nothing unless it sends `triage.enabled: false` or a review was requested with `@qa.tech`.

Send `commitHash` from CI (`pull_request.head.sha`) when calling from GitHub Actions so triage, prepare, and this request key off the commit the workflow is building. QA.tech uses it for review state and updates the stored pull request head when webhooks lag.

In every case the response is the review conversation. Poll `get_chat_conversation` until its `status` is `completed`, `failed`, or `cancelled`.



## OpenAPI

````yaml /api-reference/api.json post /v1/chat/change-review
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: Issues
  - name: Todos
  - name: Automations
  - name: Test plans
paths:
  /v1/chat/change-review:
    post:
      tags:
        - Chat
      summary: Start change review chat
      description: >-
        Start an autonomous change review from either a PR URL or raw change
        input. Returns 202 with the review conversation.


        PR mode reuses the pull request's existing review conversation unless
        `forceNewConversation` is true or that conversation is archived.


        For a GitHub pull request's head commit:

        - If a `POST /chat/change-review/prepare` request left a review waiting,
        this request runs its tests against `applicationOverrides` in the same
        conversation, with this request's `context`.

        - Otherwise it runs a full review.

        - If PR triage skipped the commit, it does nothing unless it sends
        `triage.enabled: false` or a review was requested with `@qa.tech`.


        Send `commitHash` from CI (`pull_request.head.sha`) when calling from
        GitHub Actions so triage, prepare, and this request key off the commit
        the workflow is building. QA.tech uses it for review state and updates
        the stored pull request head when webhooks lag.


        In every case the response is the review conversation. Poll
        `get_chat_conversation` until its `status` is `completed`, `failed`, or
        `cancelled`.
      operationId: StartChangeReviewChat
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartChangeReviewRequest'
      responses:
        '202':
          description: >-
            The request has been accepted for processing, but processing has not
            yet completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatConversationResponse'
components:
  schemas:
    StartChangeReviewRequest:
      anyOf:
        - $ref: '#/components/schemas/StartChangeReviewFromPrRequest'
        - $ref: '#/components/schemas/StartChangeReviewFromRawChangesRequest'
      description: Request body for starting a change review chat
    ChatConversationResponse:
      type: object
      required:
        - shortId
        - url
        - createdAt
        - updatedAt
        - status
        - runs
      properties:
        shortId:
          $ref: '#/components/schemas/ChatConversationShortId'
        url:
          type: string
          description: Dashboard URL for the conversation.
        title:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        source:
          type: string
          enum:
            - api
            - ui
            - github
            - gitlab
            - system
          description: >-
            Where the conversation originated. `api` for conversations created
            via this API, `ui` for the dashboard, `github`/`gitlab` for
            VCS-triggered chats, and `system` for everything else.
        status:
          type: string
          enum:
            - in_progress
            - completed
            - failed
            - cancelled
          description: >-
            Overall conversation lifecycle. `in_progress` while the assistant is
            working or a background test run / research task is still going.
            Assistant message `COMPLETED` is not enough — starting a run ends
            the current turn. Poll until this is `completed`, `failed`, or
            `cancelled`.
        runs:
          type: array
          items:
            $ref: '#/components/schemas/ChatConversationRun'
          description: >-
            Test runs started from this conversation, newest first. Empty until
            a run is created. Use `shortId` with `get_run` (`testCases` = all)
            or nested test-case short IDs from that call with
            `get_run_test_case`.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageItem'
          description: >-
            Recent messages, newest first. Empty on creation; poll
            `get_chat_conversation` to retrieve. Internal wake messages are
            omitted.
      description: Conversation data with recent messages (newest first).
    StartChangeReviewFromPrRequest:
      type: object
      required:
        - mode
        - vcsProviderId
        - applicationOverrides
        - prUrl
      properties:
        mode:
          type: string
          enum:
            - pr
        vcsProviderId:
          $ref: '#/components/schemas/VcsProviderId'
        applicationOverrides:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationOverrideWithRequiredEnvironment'
          description: >-
            Required per-application environment overrides. Optional
            customHeaders and basicAuth on environment persist auth or
            protection-bypass rules.
        prUrl:
          type: string
          format: uri
        context:
          type: string
        forceNewConversation:
          type: boolean
          description: >-
            Force a brand-new chat instead of reusing the pull request's
            existing review conversation. Defaults to false, so repeated reviews
            of the same PR share one chat unless that chat is archived.
          default: false
        postMerge:
          allOf:
            - $ref: '#/components/schemas/ChangeReviewPostMergeOptions'
          description: >-
            Optional post-merge options for this PR. Stored on the review
            conversation and applied when the PR merges. Overrides GitHub App
            integration settings for this PR only.
        triage:
          allOf:
            - $ref: '#/components/schemas/ChangeReviewTriageOptions'
          description: >-
            Optional PR triage options for this review. GitHub pull requests
            only. Overrides the GitHub App integration PR triage toggle and
            prompt for this review.
        disableReviewComments:
          type: boolean
          description: >-
            When true, the agent does not post its review comments to the pull
            request. The review still runs and is stored in QA.tech, and the
            GitHub check run is still reported. Use it when you do not want
            comments on the PR, for example during evaluation. Stored on the
            review conversation, so later reviews of this PR also stay silent
            until a request sends `false`. Omit to keep the conversation's
            current setting (comments are posted by default).
        actor:
          type: string
          description: 'Username that triggered the CI job. Example: `octocat`.'
        branch:
          type: string
          description: >-
            Branch the run was triggered from. Example: `main` or
            `refs/heads/main`.
        commitHash:
          type: string
          description: >-
            Full commit SHA the run was triggered for. Used to link the run back
            to the commit.
        commitMessage:
          type: string
          description: Commit message subject for the triggering commit.
        repository:
          type: string
          description: >-
            Repository the run was triggered from, as `owner/name`. Example:
            `QAdottech/qatech`.
        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.
      description: Start a change review chat using a pull request URL
    StartChangeReviewFromRawChangesRequest:
      type: object
      required:
        - mode
        - changes
        - applicationOverrides
      properties:
        mode:
          type: string
          enum:
            - rawChanges
        changes:
          $ref: '#/components/schemas/ChangeReviewRawChanges'
        applicationOverrides:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationOverrideWithRequiredEnvironment'
          description: >-
            Required per-application environment overrides. Optional
            customHeaders and basicAuth on environment persist auth or
            protection-bypass rules.
        context:
          type: string
        actor:
          type: string
          description: 'Username that triggered the CI job. Example: `octocat`.'
        branch:
          type: string
          description: >-
            Branch the run was triggered from. Example: `main` or
            `refs/heads/main`.
        commitHash:
          type: string
          description: >-
            Full commit SHA the run was triggered for. Used to link the run back
            to the commit.
        commitMessage:
          type: string
          description: Commit message subject for the triggering commit.
        repository:
          type: string
          description: >-
            Repository the run was triggered from, as `owner/name`. Example:
            `QAdottech/qatech`.
        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.
      description: Start a change review chat using raw change data
    ChatConversationShortId:
      type: string
      pattern: ^chat(-.+_.+|_.+)$
    ChatConversationRun:
      type: object
      required:
        - shortId
        - status
        - result
        - url
      properties:
        shortId:
          type: string
        status:
          type: string
          description: >-
            Run lifecycle status: `INITIATED`, `RUNNING`, `COMPLETED`, `ERROR`,
            or `CANCELLED`.
        result:
          type: string
          nullable: true
          description: >-
            Run outcome once complete: `PASSED`, `FAILED`, or `SKIPPED`. `null`
            while the run is still in progress.
        url:
          type: string
          description: Dashboard URL for the run.
      description: >-
        A test run started from this conversation. `shortId` works with
        `get_run` and `rerun_run`.
    ChatMessageItem:
      type: object
      required:
        - id
        - role
        - createdAt
        - text
      properties:
        id:
          type: string
        role:
          type: string
          enum:
            - user
            - assistant
        createdAt:
          type: string
          format: date-time
        text:
          type: string
          description: The plain-text body of the message.
        status:
          type: string
          enum:
            - INITIATED
            - PARTIAL
            - COMPLETED
            - CANCELLED
            - FAILED
          description: >-
            Lifecycle status of this message. Do not treat assistant `COMPLETED`
            as the end of the conversation — starting a test run ends the
            current turn while the run continues in the background. Poll the
            conversation `status` instead.
        isStreaming:
          type: boolean
          description: True while the assistant is still streaming tokens for this message.
      description: >-
        A chat message. Tool calls and reasoning are not exposed in this
        version; only the text response is returned.
    VcsProviderId:
      type: string
      enum:
        - github
        - gitlab
        - azure-devops
        - bitbucket
      description: Supported VCS providers for pull request URL review mode
    ApplicationOverrideWithRequiredEnvironment:
      type: object
      required:
        - applicationShortId
        - environment
      properties:
        applicationShortId:
          $ref: '#/components/schemas/ApplicationShortId'
        devicePresetShortId:
          $ref: '#/components/schemas/DevicePresetShortId'
        issueReporters:
          allOf:
            - $ref: '#/components/schemas/IssueReportersOverride'
          description: >-
            Which issue reporters run for this application on this run. Partial
            accessibility and performance objects are completed when the run is
            created.
        environment:
          allOf:
            - $ref: '#/components/schemas/ApplicationEnvironmentOverride'
          description: >-
            Environment to use for this application. Optional customHeaders and
            basicAuth persist auth or protection-bypass rules on the
            environment.
      description: Application override with a required environment
    ChangeReviewPostMergeOptions:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >-
            When true, run the post-merge agent after this PR merges. When
            false, skip it even if the GitHub App integration has it enabled.
        prompt:
          type: string
          maxLength: 4000
          description: >-
            Goal for the post-merge agent. This prompt is the entire task — the
            agent only changes tests when the prompt asks it to. Omit or leave
            empty to use the default maintenance prompt.
      description: >-
        Optional post-merge agent options for this pull request. When set,
        overrides the GitHub App integration post-merge settings for the agent
        that runs after this PR merges. Omit to use the integration settings.
    ChangeReviewTriageOptions:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            When true, triage may skip this review even if the GitHub App
            integration has PR triage off. When false, never skip this review,
            including a commit triage already skipped. Omit to follow the
            integration toggle.
        prompt:
          type: string
          maxLength: 4000
          description: >-
            PR triage prompt for this review, replacing the GitHub App
            integration prompt. Describes which changes to skip and which to
            review. Does not turn triage on by itself. Omit or leave empty to
            use the integration prompt.
      description: >-
        Optional triage options for this GitHub pull request review. Each field
        overrides the matching GitHub App integration PR triage setting for this
        review only. Omit a field to use the integration setting.
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    ChangeReviewRawChanges:
      type: object
      required:
        - changeDescription
        - diff
      properties:
        changeDescription:
          type: string
          minLength: 1
          description: Description of the changes
        diff:
          type: string
          minLength: 1
          description: Git diff content.
      description: Structured raw change data for change review mode
    ApplicationShortId:
      type: string
      pattern: ^app(-.+_.+|_.+)$
    DevicePresetShortId:
      type: string
      pattern: ^preset(-.+_.+|_.+)$
    IssueReportersOverride:
      type: object
      properties:
        accessibility:
          $ref: '#/components/schemas/AccessibilityIssuesOverride'
        performance:
          $ref: '#/components/schemas/PerformanceIssuesOverride'
      description: Which issue reporters run for this application on this run.
    ApplicationEnvironmentOverride:
      anyOf:
        - $ref: '#/components/schemas/ApplicationEnvironmentOverrideByUrl'
        - $ref: '#/components/schemas/ApplicationEnvironmentOverrideByShortId'
        - $ref: >-
            #/components/schemas/ApplicationEnvironmentOverrideByApplicationBuildShortId
    AccessibilityIssuesOverride:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Watch for axe accessibility issues on this application for this run.
            Omit to use the caller default: on for API runs, off for MCP.
        tags:
          type: array
          items:
            type: string
          description: >-
            axe-core tags to scan, such as wcag2aa. Omit for the default WCAG
            2.0, 2.1, and 2.2 set.
        disabledRules:
          type: array
          items:
            type: string
          description: >-
            axe-core rule ids to skip. Omit for the default disabled rules. An
            empty list disables none.
        includeIncomplete:
          type: boolean
          description: >-
            File axe incomplete results as well as violations. Omit to include
            them.
        iframes:
          type: boolean
          description: Scan inside iframes. Omit to skip iframes.
      description: >-
        Partial accessibility scan override. Omitted fields are filled when the
        run is created.
    PerformanceIssuesOverride:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Record Core Web Vitals, blocking tasks, and heap and CPU samples on
            this application for this run. Omit to leave it off.
    ApplicationEnvironmentOverrideByUrl:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          pattern: ^https?:\x2f\x2f
          description: Base URL of the environment. Must use http or https.
        name:
          type: string
        customHeaders:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentCustomHeaderRule'
          description: >-
            Custom headers for this environment. Persisted on create and on
            reuse. Omit to leave stored headers unchanged; pass an empty list to
            clear them.
        basicAuth:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentBasicAuthRule'
          description: >-
            Basic auth rules for this environment. Persisted on create and on
            reuse. Omit to leave stored rules unchanged; pass an empty list to
            clear them.
    ApplicationEnvironmentOverrideByShortId:
      type: object
      required:
        - shortId
      properties:
        shortId:
          $ref: '#/components/schemas/EnvironmentShortId'
        customHeaders:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentCustomHeaderRule'
          description: >-
            Replace custom headers on the existing environment. Omit to leave
            stored headers unchanged; pass an empty list to clear them.
        basicAuth:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentBasicAuthRule'
          description: >-
            Replace basic auth rules on the existing environment. Omit to leave
            stored rules unchanged; pass an empty list to clear them.
    ApplicationEnvironmentOverrideByApplicationBuildShortId:
      type: object
      required:
        - applicationBuildShortId
      properties:
        applicationBuildShortId:
          $ref: '#/components/schemas/ApplicationBuildShortId'
        otherApplicationBuildShortIds:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationBuildShortId'
        customHeaders:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentCustomHeaderRule'
          description: >-
            Custom headers for the preview environment created or reused for
            this build. Omit to leave stored headers unchanged; pass an empty
            list to clear them.
        basicAuth:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentBasicAuthRule'
          description: >-
            Basic auth rules for the preview environment created or reused for
            this build. Omit to leave stored rules unchanged; pass an empty list
            to clear them.
      description: >-
        Use a specific application build (created via
        `create_application_build`). Creates or reuses an environment with this
        build.
    EnvironmentCustomHeaderRule:
      type: object
      required:
        - domains
        - headers
      properties:
        domains:
          type: array
          items:
            type: string
          description: >-
            Host patterns that receive these headers. `*.preview.example.com`
            matches the apex and any subdomain.
        headers:
          type: object
          additionalProperties:
            type: string
          description: >-
            Header name to value. Applied by the platform on matching requests;
            generated test code cannot read the values.
      description: >-
        Host patterns (`*.preview.example.com` or an exact host) and the headers
        to attach to matching requests. Used for auth, deployment-protection
        bypass, and similar platform access. When provided on an environment
        override, the rules are persisted on the environment.
    EnvironmentBasicAuthRule:
      type: object
      required:
        - domains
        - username
        - password
      properties:
        domains:
          type: array
          items:
            type: string
          description: >-
            Host patterns that receive these credentials.
            `*.preview.example.com` matches the apex and any subdomain.
        username:
          type: string
          pattern: ^[^:]+$
          description: Basic auth username. May not contain `:`.
        password:
          type: string
          description: >-
            Basic auth password. Applied by the platform on matching requests;
            generated test code cannot read it.
      description: >-
        Host patterns (`*.preview.example.com` or an exact host) and the HTTP
        Basic Auth credentials to send to matching hosts. Browser, crawler, and
        API tests send `Authorization: Basic` to matching hosts only. When
        provided on an environment override, the rules are persisted on the
        environment.
    EnvironmentShortId:
      type: string
      pattern: ^env(-.+_.+|_.+)$
    ApplicationBuildShortId:
      type: string
      pattern: ^build(-.+_.+|_.+)$
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

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