# Batch Trigger Workflow Runs

> Start multiple workflow runs in a single request.

`POST /v2/batch/trigger`

## OpenAPI

````yaml workflow/openapi.yaml post /v2/batch/trigger
openapi: 3.1.0
info:
  title: Upstash Workflow REST API
  description: >
    Upstash Workflow is a serverless workflow orchestration service built on top
    of Upstash QStash and Upstash Redis.
  version: 2.0.0
  contact:
    name: Upstash
    url: https://upstash.com
servers:
  - url: https://qstash-{region}.upstash.io
    description: Regional
    variables:
      region:
        default: eu-central-1
        enum:
          - us-east-1
          - eu-central-1
security:
  - bearerAuth: []
  - bearerAuthQuery: []
paths:
  /v2/batch/trigger:
    post:
      tags:
        - Runs
      summary: Batch Trigger Workflow Runs
      description: Start multiple workflow runs in a single request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                required:
                  - destination
                properties:
                  destination:
                    type: string
                    description: The URL of the workflow to trigger.
                  body:
                    type: string
                    description: The raw request payload passed to the workflow endpoint as is. You
                      can access it via request payload parameter on the context
                      object.
                  headers:
                    type: object
                    additionalProperties:
                      type: string
                    description: HTTP headers to forward to the workflow. You can pass any headers
                      supported in the single trigger API.
      responses:
        "201":
          description: Workflow runs triggered successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    workflowRunId:
                      type: string
                      description: The ID of the triggered workflow run.
                    workflowCreatedAt:
                      type: integer
                      format: int64
                      description: The unix timestamp in milliseconds when the workflow run was
                        created.
                    deduplicated:
                      type: boolean
                      description: Whether the workflow run was deduplicated (i.e. a run with the same
                        ID already existed and a new one was not created).
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: QStash authentication token
    bearerAuthQuery:
      type: apiKey
      in: query
      name: qstash_token
      description: QStash authentication token passed as a query parameter
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
````
