v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

Delete a Message Batch

Delete a Message Batch.

Message 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.

Learn more about the Message Batches API in our user guide

delete/v1/messages/batches/{message_batch_id}

Path parameters

message_batch_idstring required

ID of the Message Batch.

ID of the Message Batch.

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

x-api-keystring

Your unique API key for authentication.

This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the Console. Each key is scoped to a Workspace.

Your unique API key for authentication.

This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the Console. Each key is scoped to a Workspace.

Response

Successful Response

idstring required

ID of the Message Batch.

type'message_batch_deleted' required

Deleted object type.

For Message Batches, this is always "message_batch_deleted".

Example response

{
  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF"
}