> ## Documentation Index
> Fetch the complete documentation index at: https://qatech-docs-bankid-manual-auth.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Post test cases

> Create a new test case for a project



## OpenAPI

````yaml /api-reference/api.json post /test-cases
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  description: API for managing test runs, test cases, and project configuration
servers:
  - url: https://api.qa.tech/v1
    description: Production
    variables: {}
security: []
tags: []
paths:
  /test-cases:
    post:
      description: Create a new test case for a project
      operationId: CreateTestCase
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTestCaseRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTestCaseResponse'
        '400':
          description: Validation error or bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '403':
          description: Account suspended or invalid token
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      security:
        - bearerAuth: []
components:
  schemas:
    CreateTestCaseRequest:
      type: object
      required:
        - name
        - goal
        - applicationShortId
      properties:
        name:
          type: string
        goal:
          type: string
        expectedResult:
          type: string
        resumeFromDependencyProjectTestCaseId:
          type: string
        waitForDependenciesProjectTestCaseIds:
          type: array
          items:
            type: string
        configShortIds:
          type: array
          items:
            $ref: '#/components/schemas/ConfigShortId'
        applicationShortId:
          $ref: '#/components/schemas/ApplicationShortId'
        scenarioShortId:
          $ref: '#/components/schemas/ScenarioShortId'
    CreateTestCaseResponse:
      type: object
      required:
        - success
        - testCase
      properties:
        success:
          type: boolean
        testCase:
          $ref: '#/components/schemas/TestCase'
    ConfigShortId:
      type: string
      pattern: ^cfg(-.+_.+|_.+)$
    ApplicationShortId:
      type: string
      pattern: ^app(-.+_.+|_.+)$
    ScenarioShortId:
      type: string
      pattern: ^scenario(-.+_.+|_.+)$
    TestCase:
      type: object
      required:
        - id
        - name
        - url
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Project API token from Settings > Integrations > API. The token is
        scoped to a specific project.

````