---
title: "Audit multiple scenarios"
method: POST
path: "/api/v1/contracts/{contract_id}/audit/batch"
tags: ["Contracts", "Schema", "Audit"]
---

# Audit multiple scenarios

`POST /api/v1/contracts/{contract_id}/audit/batch`

Execute a contract computation with multiple input scenarios.

## Path parameters

- `contract_id` string, required

## Request body

- BatchAuditRequest — Request to audit multiple scenarios in a single call.
  - `scope_name` string, nullable — The scope to execute. If not provided, uses the contract's main scope.
  - `scenarios` object[], required — List of input scenarios to evaluate

## Response `200`

Successful Response

- BatchAuditResponse — Response from batch auditing multiple scenarios.
  - `contract_id` string, required — The contract that was audited
  - `scope_executed` string, required — The scope that was executed
  - `total_scenarios` integer, required — Total number of scenarios submitted
  - `successful` integer, required — Number of scenarios that succeeded
  - `failed` integer, required — Number of scenarios that failed
  - `results` BatchAuditResult[], required — Results for each scenario
    - `scenario_index` integer, required — Index of this scenario in the request
    - `success` boolean, required — Whether this scenario succeeded
    - `outputs` object — The computed output values
    - `error` string, nullable — Error message if this scenario failed
  - `execution_time_ms` integer, required — Total execution time in milliseconds

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-17** `68622707ed43` — 2 info
  - the endpoint scheme security `APIKeyHeader` was added to the API
  - the endpoint scheme security `HTTPBearer` was added to the API

[Change history](https://skmtc.dev/benchify/apis/benchify-contract-api/changes/api/v1/contracts/:contract_id/audit/batch/post.md)

---

[API](https://skmtc.dev/benchify/apis/benchify-contract-api.md) · [All operations](https://skmtc.dev/benchify/apis/benchify-contract-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/benchify/benchify-contract-api/revisions/68622707ed43/schema)
