Search + K

Command Palette

Search for a command to run...

Sign In

Delete a Message Batch

DELETE /v1/messages/batches/{message_batch_id}
Copy endpoint
https://api.anthropic.com

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

Parameters

path Path Parameters

Name Type
message_batch_id required

ID of the Message Batch.

string

header Header Parameters

Name Type
anthropic-version

The version of the Claude API you want to use.

Read more about versioning and our version history here.

string
x-api-key

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.

string

Responses

200 application/json

Successful Response

interface DeleteMessageBatchResponse {
id: string;
type: "message_batch_deleted";
}

Client Errors

4XX application/json

Error response.

See our errors documentation for more details.

interface ErrorResponse {
error: InvalidRequestError
interface InvalidRequestError {
message: string;
type: "invalid_request_error";
}
| AuthenticationError
interface AuthenticationError {
message: string;
type: "authentication_error";
}
| BillingError
interface BillingError {
message: string;
type: "billing_error";
}
| PermissionError
interface PermissionError {
message: string;
type: "permission_error";
}
| NotFoundError
interface NotFoundError {
message: string;
type: "not_found_error";
}
| RateLimitError
interface RateLimitError {
message: string;
type: "rate_limit_error";
}
| GatewayTimeoutError
interface GatewayTimeoutError {
message: string;
type: "timeout_error";
}
| APIError
interface APIError {
message: string;
type: "api_error";
}
| OverloadedError
interface OverloadedError {
message: string;
type: "overloaded_error";
}
;
request_id: string | null;
type: "error";
}