Save completed processing for this email batch
complete_email_batchSave completed or deferred outcomes for a batch previously returned by claim_email_batch.
Requires email:read and consumer-state:write. Complete only processed IDs, including silent
decisions and unrecoverable emails decided from their headers or reported to the owner.
Defer unfinished IDs or content whose retry_can_help is true; they remain pending with bounded
retry backoff, and content repaired in the meantime becomes ready at once. Returns
completed/deferred/remaining IDs, expired_event_ids (removed by retention during the lease;
accepted, never retried), batch_released and monitor_state. Classifying every
issued ID releases the batch so other ready work can be claimed. Repeating the same outcomes
is safe; changing an outcome fails. When only deferred work remains, inspect next_retry_at.
Changes only this connection's progress: it neither edits emails, sends notifications nor
cancels another AI's work. Completion does not prove that a notification reached the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch_id | Yes | Batch ID returned by claim_email_batch for this connection. A new outcome requires an unexpired lease. | |
| event_ids | Yes | Distinct event_id values issued in this batch that were actually processed, including no-reminder decisions. May be empty if deferring items. | |
| deferred_event_ids | No | Issued event_id values not processed yet that should be retried later: unfinished work, or content whose retry_can_help is true. Must be disjoint from event_ids; the two lists together must contain 1 to 50 distinct IDs. Omit when none. |