> ## 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 chat conversation

> Create a new chat conversation and send its first message.

This is the recommended way to author tests. The QA.tech agent explores the site, grounds tests in what actually exists, and sets up login and config dependencies, so the tests are reliable rather than flaky. Prefer it over `create_test_case` unless you have already verified the flow exists and gathered the details that tool requires.

Returns 202 immediately with the created conversation. Processing is asynchronous: poll
`GET /chat/{chatConversationShortId}` until the latest assistant message has
`status: 'COMPLETED'` to read the reply.



## OpenAPI

````yaml /api-reference/api.json post /v1/chat
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: Release Checks
  - name: Projects
paths:
  /v1/chat:
    post:
      tags:
        - Chat
      summary: Start chat conversation
      description: >-
        Create a new chat conversation and send its first message.


        This is the recommended way to author tests. The QA.tech agent explores
        the site, grounds tests in what actually exists, and sets up login and
        config dependencies, so the tests are reliable rather than flaky. Prefer
        it over `create_test_case` unless you have already verified the flow
        exists and gathered the details that tool requires.


        Returns 202 immediately with the created conversation. Processing is
        asynchronous: poll

        `GET /chat/{chatConversationShortId}` until the latest assistant message
        has

        `status: 'COMPLETED'` to read the reply.
      operationId: Chat
      parameters: []
      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:
    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 to apply for this
            conversation.
        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
      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.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageItem'
          description: >-
            Recent messages, newest first. Empty on creation; poll `GET
            /chat/{chatConversationShortId}` to retrieve.
      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'
        environment:
          $ref: '#/components/schemas/ApplicationEnvironmentOverride'
      description: Application override with a required environment
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    ChatConversationShortId:
      type: string
      pattern: ^chat(-.+_.+|_.+)$
    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 the message. Poll until `COMPLETED` to know the
            assistant has finished.
        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(-.+_.+|_.+)$
    ApplicationEnvironmentOverride:
      anyOf:
        - $ref: '#/components/schemas/ApplicationEnvironmentOverrideByUrl'
        - $ref: '#/components/schemas/ApplicationEnvironmentOverrideByShortId'
        - $ref: >-
            #/components/schemas/ApplicationEnvironmentOverrideByApplicationBuildShortId
    ApplicationEnvironmentOverrideByUrl:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
        name:
          type: string
    ApplicationEnvironmentOverrideByShortId:
      type: object
      required:
        - shortId
      properties:
        shortId:
          $ref: '#/components/schemas/EnvironmentShortId'
    ApplicationEnvironmentOverrideByApplicationBuildShortId:
      type: object
      required:
        - applicationBuildShortId
      properties:
        applicationBuildShortId:
          $ref: '#/components/schemas/ApplicationBuildShortId'
      description: >-
        Use a specific application build (from POST /v1/application/builds).
        Creates or reuses an environment with this build.
    EnvironmentShortId:
      type: string
      pattern: ^env(-.+_.+|_.+)$
    ApplicationBuildShortId:
      type: string
      pattern: ^build(-.+_.+|_.+)$
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````