---
title: "Claim Batch"
method: POST
path: "/tasks/claim-batch"
---

# Claim Batch

`POST /tasks/claim-batch`

## Request

- Base URL: `http://127.0.0.1:8052`
- URL: `http://127.0.0.1:8052/tasks/claim-batch`
- Auth: none declared

Atomically claim multiple tasks by ID for an agent.

## Request body

- BatchClaimRequest: Body for POST /tasks/claim-batch.
  - `task_ids` string[], required
  - `agent_id` string, required
  - `claimed_by_session` string, nullable

## Response `200`

Successful Response

- BatchClaimResponse: Response for POST /tasks/claim-batch.
  - `claimed` string[], required
  - `failed` string[], required

## Other responses

- `422`: Validation Error
- `503`: Server is draining

---

[API](https://skmtc.dev/bernstein/apis/bernstein-task-server.md) · [All operations](https://skmtc.dev/bernstein/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc.dev/bernstein/apis/bernstein-task-server/revisions/2a20a34ad2eb?raw)
