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

# Send chat message

> Send a chat message to an existing conversation.

Returns 202 immediately. Poll `get_chat_conversation` until conversation `status`
is `completed`, `failed`, or `cancelled`. Assistant message `COMPLETED` is not
enough while a test run is still in progress. Wait at least 1s between polls.



## OpenAPI

````yaml /api-reference/api.json post /v1/chat/{chatConversationShortId}
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/{chatConversationShortId}:
    post:
      tags:
        - Chat
      summary: Send chat message
      description: >-
        Send a chat message to an existing conversation.


        Returns 202 immediately. Poll `get_chat_conversation` until conversation
        `status`

        is `completed`, `failed`, or `cancelled`. Assistant message `COMPLETED`
        is not

        enough while a test run is still in progress. Wait at least 1s between
        polls.
      operationId: AppendChatMessage
      parameters:
        - name: chatConversationShortId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ChatConversationShortId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
      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:
    ChatConversationShortId:
      type: string
      pattern: ^chat(-.+_.+|_.+)$
    ChatRequest:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          minLength: 1
          description: >-
            The message text to send. Example: 'Generate a login flow test for
            staging'.
        applicationOverrides:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationOverrideWithRequiredEnvironment'
          description: >-
            Optional per-application environment overrides. Optional
            customHeaders and basicAuth on environment persist auth or
            protection-bypass rules.
        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: Request body for sending a chat message
    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).
    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
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    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.
    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.