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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# Trigger a suite run

> Trigger a suite run. Schedules scenario executions for all active scenarios x targets x repeatCount. When the id names a test suite, the targets, the repeat count and the models are read from the body. Deprecated: use /api/v1/run-plans and /api/v1/test-suites.



## OpenAPI

````yaml POST /api/v1/suites/{id}/run
openapi: 3.1.0
info:
  title: LangWatch API
  description: LangWatch openapi spec
  version: 1.0.0
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/v1/suites/{id}/run:
    post:
      description: >-
        Trigger a suite run. Schedules scenario executions for all active
        scenarios x targets x repeatCount. When the id names a test suite, the
        targets, the repeat count and the models are read from the body.
        Deprecated: use /api/v1/run-plans and /api/v1/test-suites.
      operationId: postApiSuitesByIdRun
      parameters:
        - in: path
          name: id
          schema:
            type: string
            minLength: 1
          required: true
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                idempotencyKey:
                  type: string
                name:
                  description: >-
                    The run plan this run joins or creates. Used only when the
                    id names a test suite; derived from the suite name and the
                    targets when absent.
                  type: string
                  minLength: 1
                  maxLength: 200
                targets:
                  description: >-
                    The prompts, agents or workflows the run goes against. Read
                    only when the id names a test suite, which stores no target
                    of its own; a run plan already holds its own and refuses
                    these.
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - prompt
                          - http
                          - code
                          - workflow
                          - connected
                          - voice
                      referenceId:
                        type: string
                        minLength: 1
                      scenarioMappings:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          oneOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: source
                                sourceId:
                                  type: string
                                  minLength: 1
                                path:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - type
                                - sourceId
                                - path
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: value
                                value:
                                  type: string
                              required:
                                - type
                                - value
                              additionalProperties: false
                      runParameters:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          anyOf:
                            - type: string
                              maxLength: 4096
                            - type: number
                            - type: boolean
                      runSecretParameterNames:
                        maxItems: 50
                        type: array
                        items:
                          type: string
                          maxLength: 64
                    required:
                      - type
                      - referenceId
                    additionalProperties: false
                repeatCount:
                  description: >-
                    How many times each scenario and target pairing runs,
                    between 1 and 5. Used only when the id names a test suite.
                  type: integer
                  minimum: 1
                  maximum: 5
                simulatorModel:
                  description: >-
                    The model that plays the user for every scenario in the run.
                    Used only when the id names a test suite.
                  type:
                    - string
                    - 'null'
                judgeModel:
                  description: >-
                    The model that judges every scenario in the run. Used only
                    when the id names a test suite.
                  type:
                    - string
                    - 'null'
                parameters:
                  description: >-
                    Constant values applied to every scenario in the run, e.g. a
                    fixture id or a tenant. A value supplied here overrides the
                    scenario's own default for that name.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    anyOf:
                      - type: string
                        maxLength: 4096
                      - type: number
                      - type: boolean
                note:
                  description: >-
                    One short line describing why this batch was run, e.g. a
                    commit hash or what you changed. It is stored on every run
                    of the batch and shown beside the run in the platform. Up to
                    200 characters.
                  type: string
                  maxLength: 200
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  scheduled:
                    type: boolean
                  batchRunId:
                    type: string
                  setId:
                    type: string
                  jobCount:
                    type: number
                  skippedArchived:
                    type: object
                    properties:
                      scenarios:
                        type: array
                        items:
                          type: string
                      targets:
                        type: array
                        items:
                          type: string
                    required:
                      - scenarios
                      - targets
                    additionalProperties: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        scenarioRunId:
                          type: string
                        scenarioId:
                          type: string
                        target:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - prompt
                                - http
                                - code
                                - workflow
                                - connected
                                - voice
                            referenceId:
                              type: string
                              minLength: 1
                            scenarioMappings:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        const: source
                                      sourceId:
                                        type: string
                                        minLength: 1
                                      path:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - type
                                      - sourceId
                                      - path
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        const: value
                                      value:
                                        type: string
                                    required:
                                      - type
                                      - value
                                    additionalProperties: false
                            runParameters:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties:
                                anyOf:
                                  - type: string
                                    maxLength: 4096
                                  - type: number
                                  - type: boolean
                            runSecretParameterNames:
                              maxItems: 50
                              type: array
                              items:
                                type: string
                                maxLength: 64
                          required:
                            - type
                            - referenceId
                          additionalProperties: false
                        name:
                          type:
                            - string
                            - 'null'
                      required:
                        - scenarioRunId
                        - scenarioId
                        - target
                        - name
                      additionalProperties: false
                  planName:
                    type: string
                  created:
                    type: boolean
                  planSlug:
                    type: string
                required:
                  - scheduled
                  - batchRunId
                  - setId
                  - jobCount
                  - skippedArchived
                  - items
                  - planSlug
                additionalProperties: false
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
                additionalProperties: false
      deprecated: true
      security:
        - project_api_key: []
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.