Referência/Webhooks/message.batch.progress
Message Batch

message.batch.progress

Percentual inteiro mudou ou chegou a 100.

Pro

Requisição

http
POST /webhooks/codechat HTTP/1.1
Content-Type: application/json
User-Agent: CodeChat-MessageBatch-Webhook/1.0
x-webhook-event: message.batch.progress

Payload

json
{
"event": "message.batch.progress",
"timestamp": "2026-07-13T15:10:00Z",
"data": {
"batch": {
"id": "01900000-0000-7000-8000-000000000001",
"ownerUserId": "11111111-1111-4111-8111-111111111111",
"name": "Aviso de manutenção",
"status": "PROCESSING",
"instances": [
{
"id": 1,
"name": "codechat-01",
"connectionStatus": "online",
"selectedCount": 20
}
],
"counts": {
"total": 100,
"processed": 35,
"pending": 64,
"sending": 1,
"success": 33,
"failed": 2,
"skipped": 0,
"unknown": 0
},
"progress": 35,
"currentItem": {
"id": "01900000-0000-7000-8000-000000000036",
"position": 35,
"recipient": "5531999999999",
"instanceName": "codechat-01"
},
"createdAt": "2026-07-13T15:00:00Z",
"startedAt": "2026-07-13T15:01:00Z",
"updatedAt": "2026-07-13T15:10:00Z"
}
}
}

Observações de entrega

  • Entregue somente ao WEBHOOK_GLOBAL_URL pela outbox PostgreSQL.
  • Respostas 2xx confirmam a entrega; falhas são reagendadas com backoff persistente.
  • Implemente idempotência por chave de negócio e aceite a possibilidade de duplicidades e reordenação.