---
title: "Envia múltiplas mensagens com o mesmo template"
method: POST
path: "/v1/messages/batch"
tags: ["messages"]
---

# Envia múltiplas mensagens com o mesmo template

`POST /v1/messages/batch`

Limite de **1000 mensagens** por lote. Faz batch insert e enfileira em lote.

## Request body

- BatchMessageRequest
  - `templateName` string, required
  - `messages` BatchMessageItem[], required
    - `receiver` string, required
    - `templateVariables` string[], nullable
    - `smartLinkParam` string, nullable
    - `smartLinkUrl` string, nullable
    - `mediaUrl` string, nullable

## Response `202`

Lote aceito

- BatchMessageResponse
  - `batchId` string, required
  - `templateName` string, required
  - `total` integer, required
  - `accepted` integer, required
  - `totalCost` number, float, required
  - `messages` BatchMessageItemResponse[], required
    - `id` string, nullable
    - `receiver` string, required
    - `status` string, required
    - `cost` number, float, nullable

## Other responses

- `400` — Payload inválido
- `401` — Token ausente ou inválido
- `422` — Entidade não processável (validação semântica falhou)
- `429` — Rate limit excedido — honre header `Retry-After`

---

[API](https://skmtc.net/ararahq/apis/ararahq-api.md) · [All operations](https://skmtc.net/ararahq/apis/ararahq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ararahq/ararahq-api/revisions/174c89e36a13/schema)
