Delete a Message Batch

Changed on

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}

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Path parameters

message_batch_idstring required

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.

anthropic-workspace-idstring

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that 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"
}

Changes

    • warning

      deleted the header request parameter x-api-key

    • breaking

      the response's property type changed from no type to object for status

    • info

      added the optional property / to the response with the status

    • info

      removed discriminator from response property for the response status

    • info

      removed from the response property oneOf list for the response status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status