/v1/workspaces/{workspace_id}/batches/{batch_id}/flushAuthClose a batch now
Sends an open batch now instead of at its window end or digest time: one message per batched channel, rendered with everything collected so far. Preferences, quiet hours, the recipient budgets and the type throttle apply as for any send. Useful to test a digest template without waiting for the morning.
Path parameters
workspace_id*string · uuidId of the workspace.
batch_id*string · uuidThe batch id (from a delivery's `batch_id`, or the list).
Headers
Idempotency-KeystringOptional: the same key returns the first response.
Response · 200 Closed; the carriers are on their way.
batch*objectThe batch after closing it.
merged*integerDeliveries merged into the carriers (`skipped: batched_into`).
Example
Request
POST https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/batches/{batch_id}/flush
Authorization: Bearer YOUR_TOKENResponse
{
"batch": {},
"merged": 0
}