---
title: "Bind the selected rows to the inputs and return one quote: the distinct searches, rows with missing inputs, searches reused from earlier work, and one maximum. Nothing runs yet."
method: POST
path: "/v1/investigations/batches"
---

# Bind the selected rows to the inputs and return one quote: the distinct searches, rows with missing inputs, searches reused from earlier work, and one maximum. Nothing runs yet.

`POST /v1/investigations/batches`

## Request

- Base URL: `https://api.specstream.ai`
- URL: `https://api.specstream.ai/v1/investigations/batches`
- Auth: API key in header `Authorization`

## Request body

- InvestigationBatchPrepare
  - `request_id` string, required
  - `function_id` string, required
  - `collection_id` string, required
  - `record_ids` string[], required
  - `bindings` object, required
  - `reuse_completed` boolean

## Response `201`

Bind the selected rows to the inputs and return one quote: the distinct searches, rows with missing inputs, searches reused from earlier work, and one maximum. Nothing runs yet.

- object
  - `data` InvestigationBatch, required
    - `batch_id` string, required
    - `function_id` string, required
    - `name` string, required
    - `collection_id` string, required
    - `state` string, required
    - `reason` string, nullable, required
    - `maximum_cents` integer, required
    - `currency` string, required
    - `quote_hash` string, required
    - `expires_at` string, date-time, required
    - `counts` object, required
    - `rows` object[], required
    - `works` object[], required
    - `created_at` string, date-time, required

## Other responses

- `default`: Error envelope

---

[API](https://skmtc.dev/specstream/apis/specstream-api.md) · [All operations](https://skmtc.dev/specstream/apis/specstream-api/llms.txt) · [OpenAPI document](https://skmtc.dev/specstream/apis/specstream-api/revisions/5a9f51143a13?raw)
