---
title: "Pause or Resume a Batch"
method: PATCH
path: "/batches/{batch_token}"
tags: ["Batches"]
---

# Pause or Resume a Batch

`PATCH /batches/{batch_token}`

## Request

- Base URL: `https://sandbox.alloy.co/v1`
- URL: `https://sandbox.alloy.co/v1/batches/{batch_token}`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `/oauth/bearer`
  - HTTP basic
- TypeScript: <https://skmtc.dev/alloy/apis/alloy-api/docs/batches/:batch_token/patch.ts> (a function with typed inputs; its response is checked against the schema)

Pause a pending batch or resume a paused batch. Send `paused` to pause a batch that is currently `pending`, or `pending` to resume a batch that is currently `paused`. Any other transition returns a `409`.

## Request body

- object
  - `batch_status` 'pending' | 'paused', required: `paused` to pause a pending batch; `pending` to resume a paused batch.

## Response `200`

Batch status updated

- object
  - `status_code` number
  - `error` object, nullable
  - `batch_token` string
  - `batch_status` string
  - `_links` object
    - `batch` BatchLink
      - `href` string

## Other responses

- `409`: The batch cannot transition to the requested status

## Changes

- **2026-11-03** `615aa97a5ddb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/alloy/apis/alloy-api/changes/batches/:batch_token/patch.md)

---

[API](https://skmtc.dev/alloy/apis/alloy-api.md) - [All operations](https://skmtc.dev/alloy/apis/alloy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alloy/apis/alloy-api/revisions/615aa97a5ddb?raw)
