Lots
Créer un lot de messages
Récupérer un lot de messages
Lister les lots de messages
Annuler un lot de messages
Supprimer un lot de messages
Récupérer les résultats d'un lot de messages
Models
BetaDeletedMessageBatch object{ id, type }
ID of the Message Batch.
type: "message_batch_deleted"Deleted object type.
Deleted object type.
For Message Batches, this is always "message_batch_deleted".
BetaMessageBatch object{ id, archived_at, cancel_initiated_at, 7 more }
BetaMessageBatchCanceledResult object{ type }
type: "canceled"
BetaMessageBatchErroredResult object{ error, type }
error: BetaErrorResponse { error, request_id, type }
type: "errored"
BetaMessageBatchExpiredResult object{ type }
type: "expired"
BetaMessageBatchIndividualResponse object{ custom_id, result }This is a single line in the response .jsonl file and does not represent the response as a whole.
This is a single line in the response .jsonl file and does not represent the response as a whole.
custom_id: stringDeveloper-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
Must be unique for each request within the Message Batch.
result: BetaMessageBatchResultProcessing result for this request.
Processing result for this request.
Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.
BetaMessageBatchRequestCounts object{ canceled, errored, expired, 2 more }
canceled: numberNumber of requests in the Message Batch that have been canceled.
Number of requests in the Message Batch that have been canceled.
This is zero until processing of the entire Message Batch has ended.
errored: numberNumber of requests in the Message Batch that encountered an error.
Number of requests in the Message Batch that encountered an error.
This is zero until processing of the entire Message Batch has ended.
expired: numberNumber of requests in the Message Batch that have expired.
Number of requests in the Message Batch that have expired.
This is zero until processing of the entire Message Batch has ended.
processing: numberNumber of requests in the Message Batch that are processing.
Number of requests in the Message Batch that are processing.
succeeded: numberNumber of requests in the Message Batch that have completed successfully.
Number of requests in the Message Batch that have completed successfully.
This is zero until processing of the entire Message Batch has ended.
BetaMessageBatchResult = BetaMessageBatchSucceededResult { message, type } or BetaMessageBatchErroredResult { error, type } or BetaMessageBatchCanceledResult { type } or BetaMessageBatchExpiredResult { type }Processing result for this request.
Processing result for this request.
Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.