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

# Create Run

> Create and start a new test run (Public API with API Key authentication)



## OpenAPI

````yaml /openapi.json post /v1/runs/
openapi: 3.1.0
info:
  title: NOQA Public API
  description: >-
    Public API for mobile app testing automation. Authenticate using API Key in
    x-api-key header.
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
paths:
  /v1/runs/:
    post:
      tags:
        - Runs
      summary: Create Run
      description: Create and start a new test run (Public API with API Key authentication)
      operationId: create_run_v1_runs__post
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: API Key for authentication
            title: X-Api-Key
          description: API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RunCreateRequest:
      properties:
        app_id:
          type: string
          format: uuid
          title: App Id
          description: Application ID
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
        build_id:
          type: string
          format: uuid
          title: Build Id
          description: ID of the build to test
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
        cases:
          $ref: '#/components/schemas/CasesSelection'
          description: Test cases selection (by tags or IDs)
        device:
          $ref: '#/components/schemas/DeviceRequest'
          description: Target device configuration
      type: object
      required:
        - app_id
        - build_id
        - cases
        - device
      title: RunCreateRequest
      description: Request model for creating test run via Public API
    RunResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier of the test run
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the run was created
        build:
          anyOf:
            - $ref: >-
                #/components/schemas/src__routers__public__v1__runs__schemas__BuildResponse
            - type: 'null'
          description: Build information
        device:
          anyOf:
            - $ref: '#/components/schemas/DeviceConfig'
            - type: 'null'
          description: Device configuration used for the run
        status:
          $ref: '#/components/schemas/RunStatus'
          description: Overall run status
          examples:
            - running
            - completed
            - cancelled
        test_count:
          type: integer
          title: Test Count
          description: Total number of tests in the run
          examples:
            - 10
        statuses:
          additionalProperties:
            type: integer
          propertyNames:
            $ref: '#/components/schemas/TestStatus'
          type: object
          title: Statuses
          description: Count of tests by status
          examples:
            - failed: 2
              passed: 3
              queued: 5
        tests:
          items:
            $ref: '#/components/schemas/TestSummaryResponse'
          type: array
          title: Tests
          description: List of tests in the run
      type: object
      required:
        - id
        - created_at
        - status
        - test_count
        - statuses
      title: RunResponse
      description: Response model for test run detail in Public API
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CasesSelection:
      properties:
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
          description: >-
            List of tag names to filter cases (cases must have all specified
            tags)
          examples:
            - - smoke
              - regression
        ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Ids
          description: List of test case IDs to run
          examples:
            - - 550e8400-e29b-41d4-a716-446655440000
      type: object
      title: CasesSelection
      description: Test cases selection - either by tags or by IDs
    DeviceRequest:
      properties:
        model:
          type: string
          title: Model
          description: Device model name
          examples:
            - iPhone 15 Pro
        os_version:
          type: string
          title: Os Version
          description: Operating system version
          examples:
            - 17.6.1
        platform:
          $ref: '#/components/schemas/Platform'
          description: Platform (ios or android)
          examples:
            - ios
            - android
        locale:
          type: string
          title: Locale
          description: Device locale
          default: en_US
          examples:
            - en_US
            - ru_RU
            - zh_CN
            - es_ES
      type: object
      required:
        - model
        - os_version
        - platform
      title: DeviceRequest
      description: Device specification for test run
    src__routers__public__v1__runs__schemas__BuildResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Build ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Build name
        version:
          type: string
          title: Version
          description: Build version
      type: object
      required:
        - id
        - version
      title: BuildResponse
      description: Build summary for run response
    DeviceConfig:
      properties:
        model:
          type: string
          title: Model
        os_version:
          type: string
          title: Os Version
        platform:
          anyOf:
            - $ref: '#/components/schemas/Platform'
            - type: 'null'
        locale:
          type: string
          title: Locale
          default: en_US
      type: object
      required:
        - model
        - os_version
      title: DeviceConfig
      description: Device configuration for test execution (cloud-agnostic)
    RunStatus:
      type: string
      enum:
        - queued
        - running
        - passed
        - failed
        - cancelled
      title: RunStatus
      description: Run status enumeration
    TestSummaryResponse:
      properties:
        case_id:
          type: string
          format: uuid
          title: Case Id
          description: Test case ID
        case_name:
          type: string
          title: Case Name
          description: Test case name
        status:
          $ref: '#/components/schemas/TestStatus'
          description: Test status
      type: object
      required:
        - case_id
        - case_name
        - status
      title: TestSummaryResponse
      description: Test summary in run response
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Platform:
      type: string
      enum:
        - ios
        - android
      title: Platform
      description: Platform enumeration
    TestStatus:
      type: string
      enum:
        - queued
        - running
        - passed
        - failed
        - errored
        - cancelled
      title: TestStatus
      description: Test status enumeration
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication. Get your API key from NOQA dashboard.

````