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

# Add a test to a group

> Add an existing test to a test group. Returns 201 when a new membership row was created, or 200 with `added: false` when the test was already a member (idempotent).



## OpenAPI

````yaml /openapi.json post /v1/groups/{groupId}/tests
openapi: 3.0.0
info:
  title: TestArmy API
  version: 1.0.0
  description: >-
    AI-powered browser automation API for QA testing. Automate web testing
    workflows using natural language prompts.
servers:
  - url: https://tester.army/api
    description: Production API server
security: []
paths:
  /v1/groups/{groupId}/tests:
    post:
      tags:
        - Groups
      summary: Add a test to a group
      description: >-
        Add an existing test to a test group. Returns 201 when a new membership
        row was created, or 200 with `added: false` when the test was already a
        member (idempotent).
      parameters:
        - schema:
            type: string
            format: uuid
            description: Test group ID
          required: true
          description: Test group ID
          name: groupId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                testId:
                  type: string
                  format: uuid
              required:
                - testId
      responses:
        '200':
          description: Test was already a member; no change
          content:
            application/json:
              schema:
                type: object
                properties:
                  groupId:
                    type: string
                    format: uuid
                  testId:
                    type: string
                    format: uuid
                  added:
                    type: boolean
                    enum:
                      - false
                required:
                  - groupId
                  - testId
                  - added
        '201':
          description: Test added to group
          content:
            application/json:
              schema:
                type: object
                properties:
                  groupId:
                    type: string
                    format: uuid
                  testId:
                    type: string
                    format: uuid
                  added:
                    type: boolean
                    enum:
                      - true
                required:
                  - groupId
                  - testId
                  - added
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '404':
          description: Not Found - Resource does not exist or is not accessible
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '429':
          description: Too Many Requests - Usage limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '504':
          description: Gateway Timeout - Test execution exceeded time limit
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication using Bearer token format

````