The whole hunk
from line 1, old and new numbered
/
lines
from line 1
1---
2title: Cancel a Message Batch
3url: https://platform.claude.com/docs/en/api/beta/messages/batches/cancel
4---
5
16# Cancel a Message Batch
27
38**POST** `/v1/messages/batches/{message_batch_id}/cancel`
from line 27
2227
2328 - `string`
2429
25 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
30 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2631
2732 - `"message-batches-2024-09-24"`
2833
from line 75
7075
7176 - `"user-profiles-2026-08-18"`
7277
78 - `"user-profiles-2026-09-04"`
79
7380 - `"advisor-tool-2026-03-01"`
7481
7582 - `"managed-agents-2026-04-01"`
from line 119
112119
113120 - `"mid-conversation-system-clear-at-2026-08-21"`
114121
122- `"anthropic-workspace-id": optional string`
123
115124## Returns
116125
117126- `BetaMessageBatch object`
118127
128 - `type: "message_batch"`
129
130 Object type.
131
132 For Message Batches, this is always `"message_batch"`.
133
134 default: message_batch
135
119136 - `id: string`
120137
121138 Unique object identifier.
from line 230
213230 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
214231
215232 Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
216
217 - `type: "message_batch"`
218
219 Object type.
220
221 For Message Batches, this is always `"message_batch"`.
222
223 default: message_batch
224233
225234## Example
226235