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

> Deprecated: use /api/v1/run-plans and /api/v1/test-suites. 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.



## OpenAPI

````yaml POST /api/suites/{id}/run
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/suites/{id}/run:
    post:
      description: >-
        Deprecated: use /api/v1/run-plans and /api/v1/test-suites. 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.
      operationId: postApiSuitesByIdRun
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                idempotencyKey:
                  type: string
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                  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.
                targets:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - prompt
                          - http
                          - code
                          - workflow
                        description: What kind of thing the scenarios run against.
                      referenceId:
                        type: string
                        description: >-
                          The id of the prompt, agent or workflow to run
                          against.
                    required:
                      - type
                      - referenceId
                  description: >-
                    The prompts, agents or workflows the run goes against. Used
                    only when the id names a test suite, which stores no target
                    of its own.
                repeatCount:
                  type: integer
                  minimum: 1
                  maximum: 5
                  description: >-
                    How many times each scenario and target pairing runs,
                    between 1 and 5. Used only when the id names a test suite.
                simulatorModel:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The model that plays the user for every scenario in the run.
                    Used only when the id names a test suite.
                judgeModel:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The model that judges every scenario in the run. Used only
                    when the id names a test suite.
                parameters:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                        maxLength: 4096
                      - type: number
                      - type: boolean
                  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.
                note:
                  type: string
                  maxLength: 200
                  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.
      responses:
        '200':
          description: Suite run scheduled
          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
                  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
                              description: What kind of thing the scenarios run against.
                            referenceId:
                              type: string
                              description: >-
                                The id of the prompt, agent or workflow to run
                                against.
                          required:
                            - type
                            - referenceId
                        name:
                          type:
                            - string
                            - 'null'
                      required:
                        - scenarioRunId
                        - scenarioId
                        - target
                        - name
                required:
                  - scheduled
                  - batchRunId
                  - setId
                  - jobCount
                  - skippedArchived
                  - items
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
        '404':
          description: Suite not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  code:
                    type: string
                    description: The domain error code, when the refusal names one.
                required:
                  - error
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
      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.

````