Repository Public
1---2title: Delete a Message Batch3url: https://platform.claude.com/docs/en/api/messages/batches/delete4---56# Delete a Message Batch78**DELETE** `/v1/messages/batches/{message_batch_id}`910Delete a Message Batch.1112Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-progress batch, you must first cancel it.1314Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)1516## Path parameters1718- `message_batch_id: string`1920 ID of the Message Batch.2122## Headers2324- `"anthropic-workspace-id": optional string`2526## Returns2728- `DeletedMessageBatch object`2930 - `type: "message_batch_deleted"`3132 Deleted object type.3334 For Message Batches, this is always `"message_batch_deleted"`.3536 default: message_batch_deleted3738 - `id: string`3940 ID of the Message Batch.4142## Example4344```bash45curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID \46 -X DELETE \47 -H 'anthropic-version: 2023-06-01' \48 -H "X-Api-Key: $ANTHROPIC_API_KEY"49```5051### Response (200)5253```json54{55 "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",56 "type": "message_batch_deleted"57}58```59