v27

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2193427579.9 KB
Messages

Cancel a Message Batch.

Cancel a Message Batch before processing ends.

post/v1/messages/batches/{message_batch_id}/cancel

Path parameters

message_batch_idstring required

Response

Successful Response

idstring required

Unique object identifier (msgbatch_ prefix).

type'message_batch'
processing_status'in_progress' | 'canceling' | 'ended' required

Processing status of the Message Batch.

created_atstring required

RFC 3339 datetime when the batch was created.

expires_atstring required

RFC 3339 datetime when processing will expire.

cancel_initiated_atstring nullable

RFC 3339 datetime when cancellation was initiated.

ended_atstring nullable

RFC 3339 datetime when all processing ended.

archived_atstring nullable

RFC 3339 datetime when the batch was archived.

results_urlstring nullable

URL to a .jsonl file containing the results.