---
title: "Trigger a defined batch"
method: POST
path: "/v2/batches/{batchId}/trigger"
tags: ["Batches"]
---

# Trigger a defined batch

`POST /v2/batches/{batchId}/trigger`

## Request

- Base URL: `https://app.aiva.works` (the document declares no server; this is the origin it was published from)
- URL: `https://app.aiva.works/v2/batches/{batchId}/trigger`
- Auth: API key in header `X-API-KEY`

Runs a defined batch now and returns the ID of the started batch execution.

## Path parameters

- `batchId` string, guid, required

## Response `202`

Batch execution started

- TriggerBatchV2Response
  - `executionId` string, guid: ID of the started batch execution.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: User does not have permission to access batches
- `404`: Batch with given ID not found
- `409`: The batch is already running
- `429`: Queue limit exceeded -- retry later
- `500`: Server Error

---

[API](https://skmtc.dev/aiva/apis/aiva-cloud-api.md) · [All operations](https://skmtc.dev/aiva/apis/aiva-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aiva/apis/aiva-cloud-api/revisions/70eef14d3bcd?raw)
