## Headers
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/messages/batches/cancel
4---
5
16# Cancel a Message Batch
27
38**POST** `/v1/messages/batches/{message_batch_id}/cancel`
from line 19
1419
1520 ID of the Message Batch.
1621
22## Headers
23
24- `"anthropic-workspace-id": optional string`
25
1726## Returns
1827
1928- `MessageBatch object`
2029
30 - `type: "message_batch"`
31
32 Object type.
33
34 For Message Batches, this is always `"message_batch"`.
35
36 default: message_batch
37
2138 - `id: string`
2239
2340 Unique object identifier.
from line 132
115132 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
116133
117134 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.
118
119 - `type: "message_batch"`
120
121 Object type.
122
123 For Message Batches, this is always `"message_batch"`.
124
125 default: message_batch
126135
127136## Example
128137